Skip to content

Commit

Permalink
Fix dependencies and failing specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ugisozols committed Jan 21, 2014
1 parent 9469a6e commit 3afe53d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -3,14 +3,14 @@ source 'https://rubygems.org'
gemspec

gem 'json'
gem 'protected_attributes'
gem 'refinerycms', github: 'refinery/refinerycms', branch: 'master'
gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'

gem 'friendly_id-globalize', github: 'norman/friendly_id-globalize', branch: 'master'
gem 'globalize'
gem 'paper_trail', github: 'airblade/paper_trail', branch: 'master'
gem 'awesome_nested_set', github: 'collectiveidea/awesome_nested_set', branch: 'master'
gem "mime-types", "~> 1.25"

group :test do
gem 'refinerycms-testing', github: 'refinery/refinerycms', branch: 'master'
Expand Down
10 changes: 5 additions & 5 deletions spec/models/refinery/setting_spec.rb
Expand Up @@ -43,30 +43,30 @@ module Refinery

it "should default to form_value_type text_area" do
set = ::Refinery::Setting.set(:creating_from_scratch, {:value => "a value", :scoping => 'rspec_testing'})
::Refinery::Setting.find_by_name(:creating_from_scratch.to_s, :conditions => {:scoping => 'rspec_testing'}).form_value_type.should eq("text_area")
::Refinery::Setting.find_by(:name => 'creating_from_scratch', :scoping => 'rspec_testing').form_value_type.should eq("text_area")
end

it "should fix true as a value to 'true' (string)" do
set = ::Refinery::Setting.set(:creating_from_scratch, {:value => true, :scoping => 'rspec_testing'})
::Refinery::Setting.find_by_name(:creating_from_scratch.to_s, :conditions => {:scoping => 'rspec_testing'})[:value].should eq('true')
::Refinery::Setting.find_by(:name => 'creating_from_scratch', :scoping => 'rspec_testing')[:value].should eq('true')
set.should eq(true)
end

it "should fix false as a value to 'false' (string)" do
set = ::Refinery::Setting.set(:creating_from_scratch, {:value => false, :scoping => 'rspec_testing'})
::Refinery::Setting.find_by_name(:creating_from_scratch.to_s, :conditions => {:scoping => 'rspec_testing'})[:value].should eq('false')
::Refinery::Setting.find_by(:name => 'creating_from_scratch', :scoping => 'rspec_testing')[:value].should eq('false')
set.should eq(false)
end

it "should fix '1' as a value with a check_box form_value_type to true" do
set = ::Refinery::Setting.set(:creating_from_scratch, {:value => "1", :scoping => 'rspec_testing', :form_value_type => 'check_box'})
::Refinery::Setting.find_by_name(:creating_from_scratch.to_s, :conditions => {:scoping => 'rspec_testing'})[:value].should eq('true')
::Refinery::Setting.find_by(:name => 'creating_from_scratch', :scoping => 'rspec_testing')[:value].should eq('true')
set.should eq(true)
end

it "should fix '0' as a value with a check_box form_value_type to false" do
set = ::Refinery::Setting.set(:creating_from_scratch, {:value => "0", :scoping => 'rspec_testing', :form_value_type => 'check_box'})
::Refinery::Setting.find_by_name(:creating_from_scratch.to_s, :conditions => {:scoping => 'rspec_testing'})[:value].should eq('false')
::Refinery::Setting.find_by(:name => 'creating_from_scratch', :scoping => 'rspec_testing')[:value].should eq('false')
set.should eq(false)
end
end
Expand Down

0 comments on commit 3afe53d

Please sign in to comment.