Skip to content

Commit

Permalink
Fix Rails version comparison
Browse files Browse the repository at this point in the history
As introduced in the actual code in 0a443aa, this updates the test suite
to match so we don't have failing test cases.
  • Loading branch information
alexblackie committed Mar 24, 2015
1 parent 98cc33b commit e7dbad2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/deface/environment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ module Deface
end

it "should add paths to watchable_dir when running Rails 3.2" do
if Rails.version[0..2] == '3.2'
if Rails.version[0..2] >= '3.2'
Rails.application.config.deface.overrides.send(:enumerate_and_load, ["app/gold"], root)
expect(Rails.application.config.watchable_dirs).to eq({"/some/path/app/gold" => [:rb, :deface] })
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module ActionView::CompiledTemplates
allow(Rails.application.config).to receive(:deface).and_return ActiveSupport::OrderedOptions.new
Rails.application.config.deface.enabled = true

if Rails.version[0..2] == '3.2'
if Rails.version[0..2] >= '3.2'
allow(Rails.application.config).to receive(:watchable_dirs).and_return({})
end

Expand Down

0 comments on commit e7dbad2

Please sign in to comment.