Merge pull request #226 from jasnow/master

Upgraded rspec 2.14.2 to 2.99.0.
This commit is contained in:
Ken Johnson
2016-04-07 08:17:43 -04:00
13 changed files with 76 additions and 54 deletions
+4 -2
View File
@@ -5,6 +5,8 @@ gem 'rails', '4.2.6'
ruby '2.3.0' ruby '2.3.0'
gem 'rake', '10.5.0' # LOCKED DOWN UNTIL MOVE TO RSPEC beta2.
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', github: 'rails/rails' # gem 'rails', github: 'rails/rails'
@@ -39,7 +41,7 @@ group :development, :test, :mysql do
gem 'capybara' gem 'capybara'
gem 'database_cleaner' gem 'database_cleaner'
gem 'poltergeist' gem 'poltergeist'
gem 'rspec-rails', '2.14.2' gem 'rspec-rails', '2.99.0' # LOCKED DOWN
gem 'test-unit' gem 'test-unit'
end end
@@ -72,7 +74,7 @@ gem 'jquery-rails'
# Pow related gem # Pow related gem
gem 'powder' gem 'powder'
gem 'aruba' gem 'aruba', '0.9.0.pre' # LOCKED DOWN
#gem 'minitest', '~> 4.0', :require=> "minitest/autorun" #gem 'minitest', '~> 4.0', :require=> "minitest/autorun"
#gem 'minitest' #gem 'minitest'
+42 -33
View File
@@ -38,10 +38,13 @@ GEM
tzinfo (~> 1.1) tzinfo (~> 1.1)
addressable (2.4.0) addressable (2.4.0)
arel (6.0.3) arel (6.0.3)
aruba (0.7.4) aruba (0.9.0.pre)
childprocess (>= 0.3.6) childprocess (~> 0.5.6)
cucumber (>= 1.1.1) contracts (~> 0.9)
rspec-expectations (>= 2.7.0) cucumber (>= 1.3.19)
ffi (~> 1.9.10)
rspec-expectations (>= 2.99)
thor (~> 0.19)
bcrypt (3.1.11) bcrypt (3.1.11)
better_errors (2.1.1) better_errors (2.1.1)
coderay (>= 1.0.0) coderay (>= 1.0.0)
@@ -82,8 +85,9 @@ GEM
execjs execjs
coffee-script-source (1.10.0) coffee-script-source (1.10.0)
concurrent-ruby (1.0.1) concurrent-ruby (1.0.1)
contracts (0.13.0)
crack (0.3.1) crack (0.3.1)
cucumber (2.3.2) cucumber (2.3.3)
builder (>= 2.1.2) builder (>= 2.1.2)
cucumber-core (~> 1.4.0) cucumber-core (~> 1.4.0)
cucumber-wire (~> 0.0.1) cucumber-wire (~> 0.0.1)
@@ -135,9 +139,10 @@ GEM
guard (~> 2.8) guard (~> 2.8)
guard-compat (~> 1.0) guard-compat (~> 1.0)
multi_json (~> 1.8) multi_json (~> 1.8)
guard-rspec (4.3.1) guard-rspec (4.6.5)
guard (~> 2.1) guard (~> 2.1)
rspec (>= 2.14, < 4.0) guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
guard-shell (0.7.1) guard-shell (0.7.1)
guard (>= 2.0.0) guard (>= 2.0.0)
guard-compat (~> 1.0) guard-compat (~> 1.0)
@@ -150,8 +155,8 @@ GEM
actionpack (>= 3.1) actionpack (>= 3.1)
railties (>= 3.1) railties (>= 3.1)
sass (>= 3.2) sass (>= 3.2)
jquery-rails (4.1.0) jquery-rails (4.1.1)
rails-dom-testing (~> 1.0) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
json (1.8.3) json (1.8.3)
@@ -165,8 +170,8 @@ GEM
loofah (2.0.3) loofah (2.0.3)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
lumberjack (1.0.10) lumberjack (1.0.10)
mail (2.6.3) mail (2.6.4)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 4)
mailcatcher (0.6.4) mailcatcher (0.6.4)
activesupport (~> 4.0) activesupport (~> 4.0)
eventmachine (= 1.0.9.1) eventmachine (= 1.0.9.1)
@@ -177,7 +182,9 @@ GEM
sqlite3 (~> 1.3) sqlite3 (~> 1.3)
thin (~> 1.5.0) thin (~> 1.5.0)
method_source (0.8.2) method_source (0.8.2)
mime-types (2.99.1) mime-types (3.0)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0221)
mini_portile2 (2.0.0) mini_portile2 (2.0.0)
minitest (5.8.4) minitest (5.8.4)
multi_json (1.11.2) multi_json (1.11.2)
@@ -240,29 +247,32 @@ GEM
rb-inotify (0.9.7) rb-inotify (0.9.7)
ffi (>= 0.5.0) ffi (>= 0.5.0)
ref (2.0.0) ref (2.0.0)
rspec (2.14.1) rspec (2.99.0)
rspec-core (~> 2.14.0) rspec-core (~> 2.99.0)
rspec-expectations (~> 2.14.0) rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.14.0) rspec-mocks (~> 2.99.0)
rspec-core (2.14.8) rspec-collection_matchers (1.1.2)
rspec-expectations (2.14.5) rspec-expectations (>= 2.99.0.beta1)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6) rspec-mocks (2.99.4)
rspec-rails (2.14.2) rspec-rails (2.99.0)
actionpack (>= 3.0) actionpack (>= 3.0)
activemodel (>= 3.0) activemodel (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
rspec-core (~> 2.14.0) rspec-collection_matchers
rspec-expectations (~> 2.14.0) rspec-core (~> 2.99.0)
rspec-mocks (~> 2.14.0) rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
ruby2ruby (2.3.0) ruby2ruby (2.3.0)
ruby_parser (~> 3.1) ruby_parser (~> 3.1)
sexp_processor (~> 4.0) sexp_processor (~> 4.0)
ruby_parser (3.8.1) ruby_parser (3.8.1)
sexp_processor (~> 4.1) sexp_processor (~> 4.1)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sass (3.4.21) sass (3.4.22)
sass-rails (5.0.4) sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0) railties (>= 4.0.0, < 5.0)
sass (~> 3.1) sass (~> 3.1)
@@ -287,7 +297,7 @@ GEM
temple (~> 0.7.3) temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1) tilt (>= 1.3.3, < 2.1)
slop (3.6.0) slop (3.6.0)
sprockets (3.5.2) sprockets (3.6.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-rails (3.0.4) sprockets-rails (3.0.4)
@@ -297,7 +307,7 @@ GEM
sqlite3 (1.3.11) sqlite3 (1.3.11)
temple (0.7.6) temple (0.7.6)
terminal-table (1.5.2) terminal-table (1.5.2)
test-unit (3.1.7) test-unit (3.1.8)
power_assert power_assert
therubyracer (0.12.2) therubyracer (0.12.2)
libv8 (~> 3.16.14.0) libv8 (~> 3.16.14.0)
@@ -316,12 +326,10 @@ GEM
coffee-rails coffee-rails
tzinfo (1.2.2) tzinfo (1.2.2)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (2.7.2) uglifier (3.0.0)
execjs (>= 0.3.0) execjs (>= 0.3.0, < 3)
json (>= 1.8.0) unicorn (5.1.0)
unicorn (5.0.1)
kgio (~> 2.6) kgio (~> 2.6)
rack
raindrops (~> 0.7) raindrops (~> 0.7)
websocket-driver (0.6.3) websocket-driver (0.6.3)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
@@ -333,7 +341,7 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
aruba aruba (= 0.9.0.pre)
bcrypt bcrypt
better_errors better_errors
binding_of_caller binding_of_caller
@@ -361,8 +369,9 @@ DEPENDENCIES
pry-rails pry-rails
rack-livereload rack-livereload
rails (= 4.2.6) rails (= 4.2.6)
rake (= 10.5.0)
rb-fsevent rb-fsevent
rspec-rails (= 2.14.2) rspec-rails (= 2.99.0)
sass-rails sass-rails
simplecov simplecov
sqlite3 sqlite3
+1 -1
View File
@@ -13,4 +13,4 @@
describe Api::V1::UsersHelper do describe Api::V1::UsersHelper do
pending "add some examples to (or delete) #{__FILE__}" pending "add some examples to (or delete) #{__FILE__}"
end end
=end =end
+1 -1
View File
@@ -13,4 +13,4 @@
describe PasswordResetsHelper do describe PasswordResetsHelper do
pending "add some examples to (or delete) #{__FILE__}" pending "add some examples to (or delete) #{__FILE__}"
end end
=end =end
+1 -1
View File
@@ -13,4 +13,4 @@
describe PayHelper do describe PayHelper do
pending "add some examples to (or delete) #{__FILE__}" pending "add some examples to (or delete) #{__FILE__}"
end end
=end =end
+2 -2
View File
@@ -11,7 +11,7 @@ describe User do
end end
it "can be instantiated" do it "can be instantiated" do
Benefits.new.should be_an_instance_of(Benefits) expect(Benefits.new).to be_an_instance_of(Benefits)
end end
it "name can be updated" do it "name can be updated" do
@@ -19,6 +19,6 @@ describe User do
user = User.all.first user = User.all.first
user.first_name = new_name user.first_name = new_name
user.save! user.save!
User.all.first.first_name.should == new_name expect(User.all.first.first_name).to eq(new_name)
end end
end end
+1 -1
View File
@@ -3,4 +3,4 @@
describe Pay do describe Pay do
pending "add some examples to (or delete) #{__FILE__}" pending "add some examples to (or delete) #{__FILE__}"
end end
=end =end
+5 -5
View File
@@ -11,20 +11,20 @@ describe User do
end end
it "can be instantiated" do it "can be instantiated" do
User.new.should be_an_instance_of(User) expect(User.new).to be_an_instance_of(User)
end end
it "should require a email" do it "should require a email" do
User.new(:email => "").should_not be_valid expect(User.new(:email => "")).not_to be_valid
end end
it "should require valid email" do it "should require valid email" do
User.new(:email => "@gmail.com").should_not be_valid expect(User.new(:email => "@gmail.com")).not_to be_valid
end end
it "should require unique email" do it "should require unique email" do
user = User.all.first user = User.all.first
User.new(:email => user.email).should_not be_valid expect(User.new(:email => user.email)).not_to be_valid
end end
it "name can be updated" do it "name can be updated" do
@@ -32,6 +32,6 @@ describe User do
user = User.all.first user = User.all.first
user.first_name = new_name user.first_name = new_name
user.save! user.save!
User.all.first.first_name.should == new_name expect(User.all.first.first_name).to eq(new_name)
end end
end end
+11
View File
@@ -51,6 +51,17 @@ RSpec.configure do |config|
config.after(:each) do config.after(:each) do
DatabaseCleaner.clean DatabaseCleaner.clean
end end
# rspec-rails 3 will no longer automatically infer an example group's spec type
# from the file location. You can explicitly opt-in to the feature using this
# config option.
# To explicitly tag specs without using automatic inference, set the `:type`
# metadata manually:
#
# describe ThingsController, :type => :controller do
# # Equivalent to being in spec/controllers
# end
config.infer_spec_type_from_file_location!
end end
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
@@ -3,4 +3,4 @@
describe "password_resets/new.html.erb" do describe "password_resets/new.html.erb" do
pending "add some examples to (or delete) #{__FILE__}" pending "add some examples to (or delete) #{__FILE__}"
end end
=end =end
@@ -23,6 +23,6 @@ feature 'command injection' do
end end
click_on 'Start Upload' click_on 'Start Upload'
end end
pending(:if => verifying_fixed?) { File.exists?(legit_file).should be_false } pending(:if => verifying_fixed?) { File.exists?(legit_file).should be_falsey }
end end
end end
+3 -3
View File
@@ -7,7 +7,7 @@ feature 'mass assignment' do
end end
scenario 'attack one' do scenario 'attack one' do
@normal_user.admin.should be_false @normal_user.admin.should be_falsey
login(@normal_user) login(@normal_user)
@@ -17,7 +17,7 @@ feature 'mass assignment' do
:password_confirmation => @normal_user.clear_password}} :password_confirmation => @normal_user.clear_password}}
page.driver.put "/users/#{@normal_user.user_id}.json", params page.driver.put "/users/#{@normal_user.user_id}.json", params
pending(:if => verifying_fixed?) { @normal_user.reload.admin.should be_true } pending(:if => verifying_fixed?) { @normal_user.reload.admin.should be_truthy }
end end
scenario 'attack two' do scenario 'attack two' do
@@ -31,7 +31,7 @@ feature 'mass assignment' do
pending(:if => verifying_fixed?) { pending(:if => verifying_fixed?) {
User.last.email.should == 'hackety@h4x0rs.c0m' User.last.email.should == 'hackety@h4x0rs.c0m'
User.last.admin.should be_true User.last.admin.should be_truthy
} }
end end
end end
+2 -2
View File
@@ -8,7 +8,7 @@ feature 'sql injection' do
end end
scenario 'attack' do scenario 'attack' do
@admin_user.admin.should be_true @admin_user.admin.should be_truthy
login(@normal_user) login(@normal_user)
@@ -29,4 +29,4 @@ feature 'sql injection' do
@admin_user.admin.should == true @admin_user.admin.should == true
} }
end end
end end