Skip to content

Commit 33df259

Browse files
committed
Merge pull request #394 from GetJobber/test_rails41
Replace Appraisal with BUNDLE_GEMFILE
2 parents 015d0de + f1e849d commit 33df259

14 files changed

+39
-157
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ doc/*
88
benchmarks/*
99
.specification
1010
.rvmrc
11-
gemfiles/*.gemfile.lock
11+
test/gemfiles/Gemfile*.lock
12+
.bundle

.travis.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
language: ruby
12
rvm:
23
- 1.8.7
34
- 1.9.3
@@ -7,12 +8,20 @@ rvm:
78
- jruby
89

910
gemfile:
10-
- gemfiles/rails3.gemfile
11-
- gemfiles/rails4.gemfile
11+
- test/gemfiles/Gemfile.rails-3.2.x
12+
- test/gemfiles/Gemfile.rails-4.0.x
13+
- test/gemfiles/Gemfile.rails-4.1.x
1214

1315
matrix:
1416
exclude:
1517
- rvm: 1.8.7
16-
gemfile: gemfiles/rails4.gemfile
18+
gemfile: test/gemfiles/Gemfile.rails-4.0.x
1719
- rvm: ree
18-
gemfile: gemfiles/rails4.gemfile
20+
gemfile: test/gemfiles/Gemfile.rails-4.0.x
21+
- rvm: 1.8.7
22+
gemfile: test/gemfiles/Gemfile.rails-4.1.x
23+
- rvm: ree
24+
gemfile: test/gemfiles/Gemfile.rails-4.1.x
25+
allow_failures:
26+
- gemfile: test/gemfiles/Gemfile.rails-4.1.x
27+
fast_finish: true

Appraisals

Lines changed: 0 additions & 9 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
### Testing
3+
4+
Tests can be ran against different versions of Rails like so:
5+
6+
```
7+
BUNDLE_GEMFILE=test/gemfiles/Gemfile.rails-3.2.x bundle install
8+
BUNDLE_GEMFILE=test/gemfiles/Gemfile.rails-3.2.x bundle exec rake test
9+
```
10+

Gemfile.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ GEM
2323
multi_json (~> 1.3)
2424
thread_safe (~> 0.1)
2525
tzinfo (~> 0.3.37)
26-
appraisal (0.5.2)
27-
bundler
28-
rake
2926
arel (4.0.2)
3027
atomic (1.1.15)
3128
bcrypt (3.1.7)
@@ -53,7 +50,6 @@ PLATFORMS
5350
ruby
5451

5552
DEPENDENCIES
56-
appraisal
5753
authlogic!
5854
bcrypt-ruby
5955
i18n

Rakefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ require 'bundler'
33

44
Bundler.setup
55

6-
require 'appraisal'
7-
86
require 'rake/testtask'
97
Rake::TestTask.new(:test) do |test|
108
test.libs << 'test'

authlogic.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
1919
s.add_development_dependency 'sqlite3'
2020
s.add_development_dependency 'timecop'
2121
s.add_development_dependency 'i18n'
22-
s.add_development_dependency 'appraisal'
2322

2423
s.files = `git ls-files`.split("\n")
2524
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")

gemfiles/rails3.gemfile.lock

Lines changed: 0 additions & 57 deletions
This file was deleted.

gemfiles/rails4.gemfile.lock

Lines changed: 0 additions & 65 deletions
This file was deleted.

lib/authlogic/test_case.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module Authlogic
5656
#
5757
# setup :activate_authlogic
5858
#
59-
# For those of you unfamiliar with TestUnit, the setup method bascially just executes a method before any test is ran.
59+
# For those of you unfamiliar with TestUnit, the setup method basically just executes a method before any test is ran.
6060
# It is essentially "setting up" your tests.
6161
#
6262
# Once you have done this, just log users in like usual:
@@ -69,7 +69,7 @@ module Authlogic
6969
# === Integration tests
7070
#
7171
# Again, just like functional tests, you don't have to do anything. As soon as you make a request, Authlogic will be
72-
# conntected. If you want to activate Authlogic before making a request follow the same steps described in the
72+
# connected. If you want to activate Authlogic before making a request follow the same steps described in the
7373
# "functional tests" section above. It works in the same manner.
7474
#
7575
# === Unit tests
@@ -81,7 +81,7 @@ module Authlogic
8181
# that looks like a controller, acts like a controller, but isn't a "real" controller. You are essentially connecting
8282
# Authlogic to your "mock" controller, then you can test off of the mock controller to make sure everything is functioning
8383
# properly.
84-
#
84+
#
8585
# I use a mock controller to test Authlogic myself. It's part of the Authlogic library that you can easily use. It's as simple
8686
# as functional and integration tests. Just do the following:
8787
#
@@ -108,14 +108,15 @@ class <<@request
108108

109109
Authlogic::Session::Base.controller = (@request && Authlogic::TestCase::RailsRequestAdapter.new(@request)) || controller
110110
end
111-
111+
112112
# The Authlogic::TestCase::MockController object passed to Authlogic to activate it. You can access this in your test.
113113
# See the module description for an example.
114114
def controller
115115
@controller ||= Authlogic::TestCase::MockController.new
116116
end
117117
end
118-
118+
119119
::Test::Unit::TestCase.send(:include, TestCase) if defined?(::Test::Unit::TestCase)
120120
::MiniTest::Unit::TestCase.send(:include, TestCase) if defined?(::MiniTest::Unit::TestCase)
121+
::MiniTest::Test.send(:include, TestCase) if defined?(::MiniTest::Test)
121122
end

0 commit comments

Comments
 (0)