Sha256: 372c31f91ce69c5442a30cca9c7b92f3727e8aa5c87483ca68e527a58910e835
Contents?: true
Size: 846 Bytes
Versions: 14
Compression:
Stored size: 846 Bytes
Contents
# Responsability # Test whether rails version > 4 # includes attr_accessible if < 4 require 'minitest_helper' require 'impressionist/rails_toggle' module Impressionist describe RailsToggle do before { @toggle = RailsToggle.new } describe "Rails 4" do # see your_minitest_path/lib/minitest/mock.rb it "must not include attr_accessible" do @toggle.stub :supported_by_rails?, false do refute @toggle.should_include? end end end describe "Strong Parameters" do # see your_minitest_path/lib/minitest/mock.rb it "must not include attr_accessible" do @toggle.stub :supported_by_rails?, true do @toggle.stub :using_strong_parameters?, true do refute @toggle.should_include? end end end end end end
Version data entries
14 entries across 14 versions & 2 rubygems