Sha256: 32ea46a29df7b49868bb34dad851912239f4408270bd2e4db8e31fe382b2089a
Contents?: true
Size: 788 Bytes
Versions: 1
Compression:
Stored size: 788 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe FeaturesController do before { @feature = mock('a feature') } describe :get => :show, :id => 'user_eats_rabbit' do before { Courgette.should_receive(:find).with('user_eats_rabbit').and_return(@feature) } it { should respond_with(:success) } it { should render_template('features/show') } it { should assign_to(:feature, :with => @feature) } end describe :get => :index do before { Rails.stub!(:root).and_return('rails/root') } before { Courgette.should_receive(:features).and_return([@feature]) } it { should respond_with(:success) } it { should render_template('features/index') } it { should assign_to(:features, :with => [@feature]) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jnicklas-courgette-0.0.2 | spec/controllers/features_controller_spec.rb |