Skip to content

Commit

Permalink
Appraise against Rails 5.0.0.beta
Browse files Browse the repository at this point in the history
Why?

With Rails' upcoming release, test against the latest beta of Rails 5.
  • Loading branch information
joshuaclayton committed Feb 6, 2016
1 parent 6c8c4b1 commit d5a3ddd
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Expand Up @@ -17,6 +17,20 @@ gemfile:
- gemfiles/4.0.gemfile
- gemfiles/4.1.gemfile
- gemfiles/4.2.gemfile
- gemfiles/5.0.gemfile
matrix:
fast_finish: true
allow_failures:
- rvm: jruby-19mode
gemfile: gemfiles/5.0.gemfile
- rvm: 1.9.3
gemfile: gemfiles/5.0.gemfile
- rvm: 2.0.0
gemfile: gemfiles/5.0.gemfile
- rvm: 2.1.0
gemfile: gemfiles/5.0.gemfile
- rvm: rbx-2
gemfile: gemfiles/5.0.gemfile
branches:
only:
- master
Expand Down
4 changes: 4 additions & 0 deletions Appraisals
Expand Up @@ -13,3 +13,7 @@ end
appraise '4.2' do
gem 'activerecord', "~> 4.2.5.1"
end

appraise '5.0' do
gem 'activerecord', "~> 5.0.0.beta2"
end
10 changes: 10 additions & 0 deletions gemfiles/5.0.gemfile
@@ -0,0 +1,10 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
gem "jdbc-sqlite3", :platforms => :jruby
gem "sqlite3", "~> 1.3.10", :platforms => :ruby
gem "activerecord", "~> 5.0.0.beta2"

gemspec :path => "../"
113 changes: 113 additions & 0 deletions gemfiles/5.0.gemfile.lock
@@ -0,0 +1,113 @@
PATH
remote: ../
specs:
factory_girl (4.5.0)
activesupport (>= 3.0.0)

GEM
remote: https://rubygems.org/
specs:
activemodel (5.0.0.beta2)
activesupport (= 5.0.0.beta2)
activerecord (5.0.0.beta2)
activemodel (= 5.0.0.beta2)
activesupport (= 5.0.0.beta2)
arel (~> 7.0)
activerecord-jdbc-adapter (1.3.19)
activerecord (>= 2.2)
activerecord-jdbcsqlite3-adapter (1.3.19)
activerecord-jdbc-adapter (~> 1.3.19)
jdbc-sqlite3 (>= 3.7.2, < 3.9)
activesupport (5.0.0.beta2)
concurrent-ruby (~> 1.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
method_source
minitest (~> 5.1)
tzinfo (~> 1.1)
appraisal (2.1.0)
bundler
rake
thor (>= 0.14.0)
arel (7.0.0)
aruba (0.7.4)
childprocess (>= 0.3.6)
cucumber (>= 1.1.1)
rspec-expectations (>= 2.7.0)
bourne (1.6.0)
mocha (~> 1.1)
builder (3.2.2)
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
concurrent-ruby (1.0.0)
concurrent-ruby (1.0.0-java)
cucumber (1.3.20)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
diff-lcs (1.1.3)
docile (1.1.5)
ffi (1.9.10)
ffi (1.9.10-java)
gherkin (2.12.2)
multi_json (~> 1.3)
gherkin (2.12.2-java)
multi_json (~> 1.3)
i18n (0.7.0)
jdbc-sqlite3 (3.8.11.2)
json (1.8.3)
json (1.8.3-java)
metaclass (0.0.4)
method_source (0.8.2)
minitest (5.8.4)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.11.2)
multi_test (0.1.2)
rake (10.5.0)
rspec (2.12.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.12.2)
simplecov (0.11.2)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sqlite3 (1.3.11)
thor (0.19.1)
thread_safe (0.3.5)
thread_safe (0.3.5-java)
timecop (0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
yard (0.8.7.6)

PLATFORMS
java
ruby

DEPENDENCIES
activerecord (~> 5.0.0.beta2)
activerecord-jdbcsqlite3-adapter
appraisal (~> 2.1.0)
aruba
bourne
cucumber (~> 1.3.15)
factory_girl!
jdbc-sqlite3
mocha (>= 0.12.8)
rspec (~> 2.12.0)
simplecov
sqlite3 (~> 1.3.10)
timecop
yard

BUNDLED WITH
1.11.2
8 changes: 8 additions & 0 deletions lib/factory_girl/strategy/stub.rb
Expand Up @@ -55,6 +55,14 @@ def update_attribute(*args)
def update_column(*args)
raise "stubbed models are not allowed to access the database - #{self.class.to_s}#update_column(#{args.join(",")})"
end

def increment!(*args)
raise "stubbed models are not allowed to access the database - #{self.class}#increment!(#{args.join(',')})"
end

def decrement!(*args)
raise "stubbed models are not allowed to access the database - #{self.class}#decrement!(#{args.join(',')})"
end
end

created_at_missing_default = result_instance.respond_to?(:created_at) && !result_instance.created_at
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/build_stubbed_spec.rb
Expand Up @@ -74,6 +74,10 @@
it "disables increment" do
expect { subject.increment!(:age) }.to raise_error(RuntimeError)
end

it "disables decrement" do
expect { subject.decrement!(:age) }.to raise_error(RuntimeError)
end
end

describe "calling `build_stubbed` with a block" do
Expand Down

0 comments on commit d5a3ddd

Please sign in to comment.