Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'includes' is being replaced by 'a hash including' in strings #1835

Closed
RGillett opened this issue Jun 30, 2017 · 1 comment
Closed

'includes' is being replaced by 'a hash including' in strings #1835

RGillett opened this issue Jun 30, 2017 · 1 comment

Comments

@RGillett
Copy link

RGillett commented Jun 30, 2017

describe 'RulesController' do
  it 'always returns the list of general rules' do
    get "/partner_setup/rules/1/general_rules"
    rules = JSON.parse(response.body)

    expect(rules).to match(a_hash_including({
      'title' => 'Test',
      'description' => 'a link will not be included in the emails'
    }))

  end

end

Running the above test gives this error:

expected [{"id"=>"1", "title"=>"Test", "description"=>"a link will not be included in the emails"}] to match (a hash including {"title" => "Test", "description" => "a link will not be a hash includingd in the emails"})
Diff:
@@ -1,2 +1,4 @@
-(a hash including {"title" => "Test", "description" => "a link will not be a hash includingd in the emails"})
+[{"id"=>"1",

  • "title"=>"Test",
  • "description"=>"a link will not be included in the emails"}]
@JonRowe
Copy link
Member

JonRowe commented Mar 12, 2020

Duplicate (and wrong repo for) rspec/rspec-expectations#1116

@JonRowe JonRowe closed this as completed Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants