1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00

Update Gem configuration for Ruby 1.9.3 and JRuby

This commit is contained in:
Prem Sichanugrist 2011-09-18 21:39:18 +07:00
parent f1f5e6d759
commit 6785f596b4
7 changed files with 38 additions and 18 deletions

View file

@ -1,12 +1,11 @@
appraise "3.0" do appraise "3.0" do
gem "rails", "3.0.10" gem "rails", "3.0.10"
gem "rake", "~> 0.8.7"
end end
appraise "3.1" do appraise "3.1" do
gem "rails", "3.1.0" gem "rails", "3.1.0"
gem 'sass'
gem 'coffee-script'
gem 'uglifier' gem 'uglifier'
gem 'jquery-rails' gem 'jquery-rails'
gem 'coffee-rails'
gem 'sass-rails'
end end

View file

@ -1,5 +1,12 @@
source 'http://rubygems.org' source 'http://rubygems.org'
gemspec gemspec
gem 'rake', '~> 0.8.7' gem 'rake', '~> 0.9.2'
# For test Rails application
gem 'sqlite3', :platform => :ruby
gem 'activerecord-jdbc-adapter', :platform => :jruby
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
gem 'jdbc-sqlite3', :platform => :jruby
gem 'jruby-openssl', :platform => :jruby
gem 'shoulda-context', '~> 1.0.0.beta1'

View file

@ -54,7 +54,8 @@ Feature: integrate with Rails
should assign_to(:example) should assign_to(:example)
end end
""" """
When I successfully run `bundle exec rake test TESTOPTS=-v --trace` When I set the "TESTOPTS" environment variable to "-v"
When I successfully run `bundle exec rake test --trace`
Then the output should contain "1 tests, 1 assertions, 0 failures, 0 errors" Then the output should contain "1 tests, 1 assertions, 0 failures, 0 errors"
And the output should contain "2 tests, 2 assertions, 0 failures, 0 errors" And the output should contain "2 tests, 2 assertions, 0 failures, 0 errors"
And the output should contain "User should require name to be set" And the output should contain "User should require name to be set"

View file

@ -19,10 +19,14 @@ When /^I generate a new rails application$/ do
When I run `rails new #{APP_NAME}` When I run `rails new #{APP_NAME}`
And I cd to "#{APP_NAME}" And I cd to "#{APP_NAME}"
And I comment out the gem "turn" from the Gemfile And I comment out the gem "turn" from the Gemfile
And I append gems from Appraisal Gemfile
And I reset Bundler environment variable And I reset Bundler environment variable
And I set the "BUNDLE_GEMFILE" environment variable to "Gemfile"
And I successfully run `bundle install --local` And I successfully run `bundle install --local`
} }
if RUBY_VERSION >= "1.9.3"
append_to_gemfile %(gem "rake", "~> 0.9.3.beta.1")
Then %(I successfully run `bundle update rake`)
end
end end
When /^I configure the application to use "([^\"]+)" from this project$/ do |name| When /^I configure the application to use "([^\"]+)" from this project$/ do |name|
@ -42,10 +46,14 @@ When /^I configure the application to use rspec\-rails$/ do
end end
When /^I configure the application to use shoulda-context$/ do When /^I configure the application to use shoulda-context$/ do
append_to_gemfile "gem 'shoulda-context', :git => 'git@github.com:thoughtbot/shoulda-context.git'" append_to_gemfile "gem 'shoulda-context', '~> 1.0.0.beta1'"
steps %{And I run `bundle install --local`} steps %{And I run `bundle install --local`}
end end
When /^I set the "([^"]*)" environment variable to "([^"]*)"$/ do |key, value|
ENV[key] = value
end
When /^I configure a wildcard route$/ do When /^I configure a wildcard route$/ do
steps %{ steps %{
When I write to "config/routes.rb" with: When I write to "config/routes.rb" with:

View file

@ -2,7 +2,13 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "rake", "~> 0.8.7" gem "rake", "~> 0.9.2"
gem "sqlite3", :platform=>:ruby
gem "activerecord-jdbc-adapter", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "jdbc-sqlite3", :platform=>:jruby
gem "jruby-openssl", :platform=>:jruby
gem "shoulda-context", "~> 1.0.0.beta1"
gem "rails", "3.0.10" gem "rails", "3.0.10"
gemspec :path=>"../" gemspec :path=>"../"

View file

@ -2,11 +2,17 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "rake", "~> 0.8.7" gem "rake", "~> 0.9.2"
gem "sqlite3", :platform=>:ruby
gem "activerecord-jdbc-adapter", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "jdbc-sqlite3", :platform=>:jruby
gem "jruby-openssl", :platform=>:jruby
gem "shoulda-context", "~> 1.0.0.beta1"
gem "rails", "3.1.0" gem "rails", "3.1.0"
gem "sass"
gem "coffee-script"
gem "uglifier" gem "uglifier"
gem "jquery-rails" gem "jquery-rails"
gem "coffee-rails"
gem "sass-rails"
gemspec :path=>"../" gemspec :path=>"../"

View file

@ -19,19 +19,12 @@ Gem::Specification.new do |s|
s.summary = %q{Making tests easy on the fingers and eyes} s.summary = %q{Making tests easy on the fingers and eyes}
s.description = %q{Making tests easy on the fingers and eyes} s.description = %q{Making tests easy on the fingers and eyes}
s.add_development_dependency("sqlite3-ruby", "~> 1.3.2")
s.add_development_dependency("mocha", "~> 0.9.10") s.add_development_dependency("mocha", "~> 0.9.10")
s.add_development_dependency("rspec-rails", "~> 2.6.1.beta1") s.add_development_dependency("rspec-rails", "~> 2.6.1.beta1")
s.add_development_dependency("cucumber", "~> 0.10.0") s.add_development_dependency("cucumber", "~> 0.10.0")
s.add_development_dependency("appraisal", "~> 0.3.4") s.add_development_dependency("appraisal", "~> 0.3.4")
s.add_development_dependency("aruba") s.add_development_dependency("aruba")
if RUBY_VERSION >= "1.9"
s.add_development_dependency("ruby-debug19", "~> 0.11.6")
else
s.add_development_dependency("ruby-debug", "~> 0.10.4")
end
if s.respond_to? :specification_version then if s.respond_to? :specification_version then
s.specification_version = 3 s.specification_version = 3
else else