Skip to content

Instantly share code, notes, and snippets.

@ianderse
Created December 4, 2014 04:28
Show Gist options
  • Save ianderse/72a01ec2895bfede748f to your computer and use it in GitHub Desktop.
Save ianderse/72a01ec2895bfede748f to your computer and use it in GitHub Desktop.
stupid controller stupid tests
require 'rails_helper'
RSpec.describe Api::V1::FacilitiesController, :type => :controller do
describe "GET index" do
before do
5.times do
Facility.create(name1: Faker::Company.name, phone: Faker::PhoneNumber.phone_number, location_state: 'CO', location_zip: Faker::Address.zip, location_city: Faker::Address.city, location_street1: Faker::Address.street_address, services_text1: Faker::Lorem.sentence, services_text2: Faker::Lorem.sentence, services_text3: Faker::Lorem.sentence)
end
end
it "renders the index template" do
get :index
expect(response).to render_template("index")
end
end
end
@ianderse
Copy link
Author

ianderse commented Dec 4, 2014

undefined method `get' for #RSpec::ExampleGroups::ApiV1FacilitiesController::GETIndex:0x007f884746dad0

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