Skip to content

Commit

Permalink
[ARCH] Updated specs against Rails 3.0.10.
Browse files Browse the repository at this point in the history
[SPEC] Fixed spec for remarkable active_model
  • Loading branch information
hosh committed Aug 28, 2011
1 parent fddcccc commit 69b2523
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 28 deletions.
17 changes: 9 additions & 8 deletions Gemfile
@@ -1,8 +1,8 @@
source :gemcutter

gem 'activemodel', '3.0.0.beta4'
gem 'activerecord', '3.0.0.beta4'
gem 'activesupport', '3.0.0.beta4'
gem 'activemodel', '3.0.10'
gem 'activerecord', '3.0.10'
gem 'activesupport', '3.0.10'

group :development do
gem 'rake', '0.8.7'
Expand All @@ -11,9 +11,10 @@ group :development do
end

group :test do
gem 'rspec', '2.0.0.beta.11'
gem 'rspec-core', '2.0.0.beta.11'
gem 'rspec-expectations', '2.0.0.beta.11'
gem 'rspec-mocks', '2.0.0.beta.11'
gem 'rspec-rails', '2.0.0.beta.11'
gem 'rspec', '2.6.0'
gem 'rspec-core', '2.6.0'
gem 'rspec-expectations', '2.6.0'
gem 'rspec-mocks', '2.6.0'
gem 'rspec-rails', '2.6.0'
gem 'awesome_print'
end
86 changes: 86 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,86 @@
GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionpack (3.0.10)
activemodel (= 3.0.10)
activesupport (= 3.0.10)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.10)
activesupport (= 3.0.10)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.10)
activemodel (= 3.0.10)
activesupport (= 3.0.10)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activesupport (3.0.10)
arel (2.0.10)
awesome_print (0.4.0)
builder (2.1.2)
diff-lcs (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
gemcutter (0.7.0)
git (1.2.5)
i18n (0.5.0)
jeweler (1.4.0)
gemcutter (>= 0.1.0)
git (>= 1.2.5)
rubyforge (>= 2.0.0)
json_pure (1.5.3)
rack (1.2.3)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
railties (3.0.10)
actionpack (= 3.0.10)
activesupport (= 3.0.10)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (0.8.7)
rdoc (3.9.4)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.0)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rspec-rails (2.6.0)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
rubyforge (2.0.4)
json_pure (>= 1.1.7)
sqlite3-ruby (1.2.5)
thor (0.14.6)
tzinfo (0.3.29)

PLATFORMS
ruby

DEPENDENCIES
activemodel (= 3.0.10)
activerecord (= 3.0.10)
activesupport (= 3.0.10)
awesome_print
jeweler (= 1.4.0)
rake (= 0.8.7)
rspec (= 2.6.0)
rspec-core (= 2.6.0)
rspec-expectations (= 2.6.0)
rspec-mocks (= 2.6.0)
rspec-rails (= 2.6.0)
sqlite3-ruby (= 1.2.5)
9 changes: 2 additions & 7 deletions remarkable_activemodel/Rakefile
Expand Up @@ -18,13 +18,8 @@ end

########### Specs

RAILS_VERSIONS = ['3.0.0']

desc "Run the specs under spec with supported Rails versions"
task :pre_commit do
RAILS_VERSIONS.each do |version|
ENV['RAILS_VERSION'] = version
puts "\n=> #{GEM_NAME}: rake spec RAILS_VERSION=#{version}"
Rake::Task[:spec].execute
end
puts "\n=> #{GEM_NAME}: rake spec"
Rake::Task[:spec].execute
end
Expand Up @@ -84,13 +84,8 @@ def define_and_validate(options={})

describe "with message option" do

if RAILS_VERSION =~ /^2.3/
it { should define_and_validate(:message => 'not valid').within(3..5).message('not valid') }
it { should_not define_and_validate(:message => 'not valid').within(3..5).message('valid') }
else
it { should define_and_validate(:too_short => 'not valid', :too_long => 'not valid').within(3..5).message('not valid') }
it { should_not define_and_validate(:too_short => 'not valid', :too_long => 'not valid').within(3..5).message('valid') }
end
it { should define_and_validate(:too_short => 'not valid', :too_long => 'not valid').within(3..5).message('not valid') }
it { should_not define_and_validate(:too_short => 'not valid', :too_long => 'not valid').within(3..5).message('valid') }

it { should define_and_validate(:is => 4, :message => 'not valid').is(4).message('not valid') }
it { should_not define_and_validate(:is => 4, :message => 'not valid').is(4).message('valid') }
Expand Down
6 changes: 0 additions & 6 deletions remarkable_activemodel/spec/spec_helper.rb
@@ -1,13 +1,7 @@
# encoding: utf-8
require 'rubygems'
require 'rspec'

RAILS_VERSION = ENV['RAILS_VERSION'] || '3.0.0.beta4'

gem 'activesupport', RAILS_VERSION
require 'active_support/all'

gem 'activemodel', RAILS_VERSION
require 'active_model'

require File.expand_path('path_helpers', File.join(File.dirname(__FILE__), '/../../'))
Expand Down

0 comments on commit 69b2523

Please sign in to comment.