Reputation: 96544
Switching to the new expect() syntax.
getting
syntax error, unexpected tASSOC, expecting '}' (SyntaxError)
for this:
expect(subject.crumbs.last.data).to eq {:foo => :bar }
How to fix this syntax error?
Upvotes: 0
Views: 691
Reputation: 168199
Another ways to fix:
expect(subject.crumbs.last.data).to eq(foo: :bar)
(Ruby 1.9+)
Upvotes: 3
Reputation: 96544
This code works (adding parentheses around the eq value) :
expect(subject.crumbs.last.data).to eq({:foo => :bar })
Upvotes: 2