Skip to content

Instantly share code, notes, and snippets.

@jimsynz
Created December 6, 2013 03:43
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 jimsynz/7818209 to your computer and use it in GitHub Desktop.
Save jimsynz/7818209 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe WidgetController do
subject { query; response }
describe '#index' do
let(:query) { get :index, format: :json }
context "when there are widgets available" do
before { Fabricate(:available_widget) }
its(:status) { should eq 200 }
end
context "when there are no widgets available" do
its(:status) { should eq 404 }
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment