Sha256: 9aa7fa5456c93e6119f42c2c9a255a01fcf029df49f6a0c686b9a926bcd21e1d

Contents?: true

Size: 474 Bytes

Versions: 5

Compression:

Stored size: 474 Bytes

Contents

require 'spec_helper'

if Rails::VERSION::MAJOR >= 4
  describe StoresController do
    describe 'GET show' do
      let(:tatsu_zine) { Store.create! name: 'Tatsu-zine' }
      before { get :show, :id => tatsu_zine.id }
      subject { assigns :store }
      it { should == tatsu_zine }
    end

    describe 'POST create' do
      it { expect { post :create, :store => {name: 'Tatsu-zine', url: 'http://tatsu-zine.com'} }.to change(Store, :count).by(1) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
action_args-1.0.4 spec/controllers/strong_parameters_spec.rb
action_args-1.0.3 spec/controllers/strong_parameters_spec.rb
action_args-1.0.2 spec/controllers/strong_parameters_spec.rb
action_args-1.0.1 spec/controllers/strong_parameters_spec.rb
action_args-1.0.0 spec/controllers/strong_parameters_spec.rb