Skip to content

Instantly share code, notes, and snippets.

@lulalala
Created April 16, 2015 07:35
Show Gist options
  • Select an option

  • Save lulalala/4c15fd799f2b4ffdba77 to your computer and use it in GitHub Desktop.

Select an option

Save lulalala/4c15fd799f2b4ffdba77 to your computer and use it in GitHub Desktop.
it do
expect{
@return_result = foo()
}.to change(Foo, :count).from(1).to(0)
expect(@return_result).to eq(true)
end
@myronmarston

Copy link
Copy Markdown

That works, or this:

it do
  expect{
    expect(foo).to eq(true)
  }.to change(Foo, :count).from(1).to(0)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment