Skip to content

Instantly share code, notes, and snippets.

@dividedmind
Created October 1, 2015 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dividedmind/1a728482e6f82fc56f9f to your computer and use it in GitHub Desktop.
Save dividedmind/1a728482e6f82fc56f9f to your computer and use it in GitHub Desktop.
describe "Foo" do
before do
allow_any_instance # ... user thing
allow_any_instance_of(Event).to receive(:resource_visible) { resource_visible }
end
let(:perform!) { get "etc" }
context "with an event invisible to both" do
let(:resource_visible) { true }
it "returns 404" do
perform!
expect(response) # ...
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment