Skip to content

Instantly share code, notes, and snippets.

@krainboltgreene
Created January 30, 2018 04:35
Show Gist options
  • Save krainboltgreene/9874292893bca412a0895ac8bc9b107e to your computer and use it in GitHub Desktop.
Save krainboltgreene/9874292893bca412a0895ac8bc9b107e to your computer and use it in GitHub Desktop.
RSpec.describe "Some HTTP Request" do
before do
get "http://example.com"
end
it "is successful" do
expect(response).to have_http_status(:ok)
end
it "increments the visitor counter" do
expect { get "http://example.com" }.to change(Vistor, :count).from(0).to(1)
end
end
RSpec.describe "Some HTTP Request" do
it "is successful" do
get "http://example.com"
expect(response).to have_http_status(:ok)
end
it "increments the visitor counter" do
expect { get "http://example.com" }.to change(Vistor, :count).from(0).to(1)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment