spec/lib/shamu/rails/features_spec.rb in shamu-0.0.9 vs spec/lib/shamu/rails/features_spec.rb in shamu-0.0.11
- old
+ new
@@ -4,11 +4,11 @@
controller ActionController::Base do
public :feature_enabled?
def show
- render text: ""
+ render plain: ""
end
end
hunt( :features_service, Shamu::Features::FeaturesService ) do
scorpion.new Shamu::Features::FeaturesService, File.expand_path( "../features.yml", __FILE__ ), {}
@@ -20,26 +20,26 @@
expect( session_store ).to receive( :fetch ).and_return nil
allow( session_store ).to receive( :set )
expect( controller ).to receive( :show ) do
expect( controller.feature_enabled?( "shopping/nux" ) ).to be_truthy
- controller.render text: ""
+ controller.render plain: ""
end
- get :show, id: 1
+ get :show, params: { id: 1 }
end
it "allows toggles to be overridden by query param" do
expect( session_store ).to receive( :fetch ).and_return nil
allow( session_store ).to receive( :set )
override = features_service.toggle_codec.pack( "shopping/discounts" => true )
expect( controller ).to receive( :show ) do
expect( controller.feature_enabled?( "shopping/discounts" ) ).to be_truthy
- controller.render text: ""
+ controller.render plain: ""
end
- get :show, id: 1, Shamu::Features::EnvStore::RACK_PARAMS_KEY => override
+ get :show, params: { id: 1, Shamu::Features::EnvStore::RACK_PARAMS_KEY => override }
end
-end
\ No newline at end of file
+end