rspec_candy 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -4
- data/README.md +5 -13
- data/Rakefile +18 -25
- data/gemfiles/Gemfile.rspec1-rails2 +17 -0
- data/gemfiles/Gemfile.rspec1-rails2.lock +31 -0
- data/gemfiles/Gemfile.rspec2-rails3 +9 -0
- data/gemfiles/Gemfile.rspec2-rails3.lock +51 -0
- data/gemfiles/Gemfile.rspec3-rails4 +9 -0
- data/gemfiles/Gemfile.rspec3-rails4.lock +61 -0
- data/lib/rspec_candy/base.rb +1 -0
- data/lib/rspec_candy/helpers.rb +1 -1
- data/lib/rspec_candy/helpers/it_should_act_like.rb +2 -2
- data/lib/rspec_candy/helpers/rails/it_should_run_callbacks.rb +6 -26
- data/lib/rspec_candy/helpers/rails/store_with_values.rb +7 -2
- data/lib/rspec_candy/helpers/stub_any_instance.rb +2 -2
- data/lib/rspec_candy/switcher.rb +27 -15
- data/lib/rspec_candy/version.rb +1 -1
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/disposable_copy_spec.rb +1 -1
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/it_should_act_like_spec.rb +0 -0
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/new_with_stubs_spec.rb +0 -0
- data/spec/rspec_candy/helpers/rails/it_should_run_callbacks_spec.rb +84 -0
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/rails/prevent_storage_spec.rb +1 -1
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/rails/store_with_values_spec.rb +6 -2
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/should_receive_and_execute_spec.rb +0 -0
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/should_receive_and_return_spec.rb +0 -0
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/should_receive_chain_spec.rb +0 -0
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/stub_any_instance_spec.rb +0 -0
- data/spec/{shared/rspec_candy → rspec_candy}/helpers/stub_existing_spec.rb +0 -0
- data/spec/{shared/rspec_candy → rspec_candy}/matchers/be_same_number_as_spec.rb +0 -0
- data/spec/{shared/rspec_candy → rspec_candy}/matchers/be_same_second_as_spec.rb +0 -0
- data/spec/{shared/rspec_candy → rspec_candy}/matchers/include_hash_spec.rb +0 -0
- data/spec/{rspec1/app_root/config/environments/test.rb → shared_examples/.keep} +0 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/support/database.rb +15 -0
- data/spec/support/database_cleaner.rb +20 -0
- data/spec/{shared/support → support}/matchers/pass_as_describe_block.rb +14 -3
- data/spec/{shared/support → support}/matchers/pass_as_example.rb +2 -0
- data/spec/{shared/app_root/app/models/model.rb → support/models.rb} +19 -0
- metadata +74 -123
- data/spec/rspec1/Gemfile +0 -16
- data/spec/rspec1/Gemfile.lock +0 -74
- data/spec/rspec1/Rakefile +0 -11
- data/spec/rspec1/app_root/config/boot.rb +0 -114
- data/spec/rspec1/app_root/config/database.yml +0 -4
- data/spec/rspec1/app_root/config/environment.rb +0 -14
- data/spec/rspec1/app_root/config/initializers/state_machine.rb +0 -1
- data/spec/rspec1/app_root/config/routes.rb +0 -4
- data/spec/rspec1/rcov.opts +0 -2
- data/spec/rspec1/spec.opts +0 -4
- data/spec/rspec1/spec/spec_helper.rb +0 -25
- data/spec/rspec1/spec/switcher_spec.rb +0 -26
- data/spec/rspec2/.rspec +0 -2
- data/spec/rspec2/Gemfile +0 -14
- data/spec/rspec2/Gemfile.lock +0 -137
- data/spec/rspec2/Rakefile +0 -11
- data/spec/rspec2/app_root/.gitignore +0 -4
- data/spec/rspec2/app_root/config/application.rb +0 -32
- data/spec/rspec2/app_root/config/boot.rb +0 -13
- data/spec/rspec2/app_root/config/database.yml +0 -4
- data/spec/rspec2/app_root/config/environment.rb +0 -5
- data/spec/rspec2/app_root/config/environments/test.rb +0 -0
- data/spec/rspec2/app_root/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rspec2/app_root/config/initializers/inflections.rb +0 -10
- data/spec/rspec2/app_root/config/initializers/mime_types.rb +0 -5
- data/spec/rspec2/app_root/config/initializers/secret_token.rb +0 -7
- data/spec/rspec2/app_root/config/initializers/session_store.rb +0 -8
- data/spec/rspec2/app_root/config/initializers/state_machine.rb +0 -1
- data/spec/rspec2/app_root/config/locales/en.yml +0 -5
- data/spec/rspec2/app_root/config/routes.rb +0 -58
- data/spec/rspec2/rcov.opts +0 -2
- data/spec/rspec2/spec/spec_helper.rb +0 -24
- data/spec/rspec2/spec/switcher_spec.rb +0 -21
- data/spec/shared/app_root/app/controllers/application_controller.rb +0 -2
- data/spec/shared/app_root/app/models/state_machine_model.rb +0 -53
- data/spec/shared/app_root/app/models/sti_child.rb +0 -3
- data/spec/shared/app_root/app/models/sti_parent.rb +0 -12
- data/spec/shared/app_root/config/initializers/state_machine.rb +0 -1
- data/spec/shared/app_root/db/migrate/001_create_model.rb +0 -14
- data/spec/shared/app_root/db/migrate/002_create_state_machine_model.rb +0 -13
- data/spec/shared/app_root/db/migrate/003_create_sti_model.rb +0 -14
- data/spec/shared/rspec_candy/helpers/rails/it_should_run_callbacks_spec.rb +0 -158
data/lib/rspec_candy/switcher.rb
CHANGED
|
@@ -2,34 +2,46 @@ module RSpecCandy
|
|
|
2
2
|
module Switcher
|
|
3
3
|
extend self
|
|
4
4
|
|
|
5
|
+
# def rspec_version
|
|
6
|
+
# if defined?(RSpec::Core)
|
|
7
|
+
# :rspec2
|
|
8
|
+
# elsif defined?(Spec)
|
|
9
|
+
# :rspec1
|
|
10
|
+
# else
|
|
11
|
+
# raise 'Cannot determine RSpec version'
|
|
12
|
+
# end
|
|
13
|
+
# end
|
|
14
|
+
|
|
5
15
|
def rspec_version
|
|
6
|
-
if defined?(
|
|
7
|
-
|
|
8
|
-
elsif defined?(Spec)
|
|
9
|
-
:rspec1
|
|
16
|
+
if defined?(Spec)
|
|
17
|
+
1
|
|
10
18
|
else
|
|
11
|
-
|
|
19
|
+
require 'rspec/version'
|
|
20
|
+
RSpec::Version::STRING.to_i
|
|
12
21
|
end
|
|
13
22
|
end
|
|
14
23
|
|
|
15
|
-
def
|
|
16
|
-
|
|
17
|
-
:rails2
|
|
18
|
-
else
|
|
19
|
-
:rails3
|
|
20
|
-
end
|
|
24
|
+
def active_record_version
|
|
25
|
+
ActiveRecord::VERSION::MAJOR
|
|
21
26
|
end
|
|
22
27
|
|
|
23
|
-
def
|
|
24
|
-
defined?(
|
|
28
|
+
def active_record_loaded?
|
|
29
|
+
defined?(ActiveRecord)
|
|
25
30
|
end
|
|
26
31
|
|
|
27
32
|
def new_mock(*args)
|
|
28
|
-
|
|
33
|
+
case rspec_version
|
|
34
|
+
when 1
|
|
35
|
+
Spec::Mocks::Mock.new(*args)
|
|
36
|
+
when 2
|
|
37
|
+
RSpec::Mocks::Mock.new(*args)
|
|
38
|
+
else
|
|
39
|
+
RSpec::Mocks::Double.new(*args)
|
|
40
|
+
end
|
|
29
41
|
end
|
|
30
42
|
|
|
31
43
|
def rspec_root
|
|
32
|
-
if rspec_version ==
|
|
44
|
+
if rspec_version == 1
|
|
33
45
|
Spec
|
|
34
46
|
else
|
|
35
47
|
RSpec
|
data/lib/rspec_candy/version.rb
CHANGED
|
@@ -39,7 +39,7 @@ describe RSpecCandy::Helpers::DisposableCopy do
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
it 'should evaluate the block after the copy has been renamed to the original class name' do
|
|
42
|
-
spy =
|
|
42
|
+
spy = double('spy')
|
|
43
43
|
spy.should_receive(:observe_name).with('Model')
|
|
44
44
|
Model.disposable_copy do
|
|
45
45
|
spy.observe_name(name)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe RSpecCandy::Helpers::Rails::ItShouldRunCallbacks do
|
|
4
|
+
|
|
5
|
+
describe '#it_should_run_callbacks' do
|
|
6
|
+
|
|
7
|
+
it 'should pass if all callbacks have been run' do
|
|
8
|
+
<<-describe_block.should pass_as_describe_block
|
|
9
|
+
describe Model, '#after_save' do
|
|
10
|
+
it_should_run_callbacks :after_save_callback2, :after_save_callback1
|
|
11
|
+
end
|
|
12
|
+
describe_block
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
it 'should only attempt to run the proper callbacks have been run' do
|
|
16
|
+
<<-describe_block.should fail_as_describe_block
|
|
17
|
+
describe Model, '#before_save' do
|
|
18
|
+
it_should_run_callbacks :after_save_callback2, :after_save_callback1
|
|
19
|
+
end
|
|
20
|
+
describe_block
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it 'should not pass if a callback has not been run' do
|
|
24
|
+
<<-describe_block.should fail_as_describe_block
|
|
25
|
+
describe Model, '#after_create' do
|
|
26
|
+
it_should_run_callbacks :after_create_callback, :unknown_callback
|
|
27
|
+
end
|
|
28
|
+
describe_block
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
it 'should not actually execute the callbacks' do
|
|
32
|
+
<<-describe_block.should pass_as_describe_block
|
|
33
|
+
def Model.after_save_callback2
|
|
34
|
+
raise "called!"
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
describe Model, '#after_save' do
|
|
38
|
+
it_should_run_callbacks :after_save_callback1
|
|
39
|
+
end
|
|
40
|
+
describe_block
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe '#it_should_run_callbacks_in_order' do
|
|
46
|
+
|
|
47
|
+
supported_callbacks = case RSpecCandy::Switcher.rspec_version
|
|
48
|
+
when 1
|
|
49
|
+
%w[before after]
|
|
50
|
+
else
|
|
51
|
+
%w[before after around]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
supported_callbacks.each do |kind|
|
|
55
|
+
|
|
56
|
+
it "should pass if all #{kind} callbacks are run in order" do
|
|
57
|
+
<<-describe_block.should pass_as_describe_block
|
|
58
|
+
describe Model, '##{kind}_save' do
|
|
59
|
+
it_should_run_callbacks_in_order :#{kind}_save_callback1, :#{kind}_save_callback2
|
|
60
|
+
end
|
|
61
|
+
describe_block
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
it "should not pass if a #{kind} callback has not been run" do
|
|
65
|
+
<<-describe_block.should fail_as_describe_block
|
|
66
|
+
describe Model, '##{kind}_create' do
|
|
67
|
+
it_should_run_callbacks_in_order :#{kind}_create_callback, :unknown_callback
|
|
68
|
+
end
|
|
69
|
+
describe_block
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
it "should not pass if #{kind} callbacks are run out of order" do
|
|
73
|
+
<<-describe_block.should fail_as_describe_block
|
|
74
|
+
describe Model, '##{kind}_save' do
|
|
75
|
+
it_should_run_callbacks_in_order :#{kind}_save_callback2, :#{kind}_save_callback1
|
|
76
|
+
end
|
|
77
|
+
describe_block
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
end
|
|
@@ -41,7 +41,7 @@ describe RSpecCandy::Helpers::Rails::PreventStorage do
|
|
|
41
41
|
it 'should prevent the record from being committed to the database' do
|
|
42
42
|
record = Model.new
|
|
43
43
|
record.prevent_storage
|
|
44
|
-
record.save.should
|
|
44
|
+
record.save.should == false
|
|
45
45
|
Model.count.should be_zero
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
|
-
require 'has_defaults'
|
|
3
2
|
|
|
4
3
|
describe RSpecCandy::Helpers::Rails::StoreWithValues do
|
|
5
4
|
|
|
@@ -9,7 +8,12 @@ describe RSpecCandy::Helpers::Rails::StoreWithValues do
|
|
|
9
8
|
|
|
10
9
|
it 'should run after_initialize callbacks' do
|
|
11
10
|
model = Model.disposable_copy do
|
|
12
|
-
|
|
11
|
+
after_initialize :set_defaults
|
|
12
|
+
def after_initialize # because old Rails
|
|
13
|
+
end
|
|
14
|
+
def set_defaults
|
|
15
|
+
self.string_field = 'Hello Universe'
|
|
16
|
+
end
|
|
13
17
|
end
|
|
14
18
|
|
|
15
19
|
record = model.store_with_values
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:')
|
|
2
|
+
|
|
3
|
+
ActiveRecord::Migration.class_eval do
|
|
4
|
+
|
|
5
|
+
create_table :models do |t|
|
|
6
|
+
t.string :string_field
|
|
7
|
+
t.references :associated_model
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
create_table :sti_models do |t|
|
|
11
|
+
t.string :type
|
|
12
|
+
t.string :string_field
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require 'database_cleaner'
|
|
2
|
+
DatabaseCleaner.strategy = :deletion
|
|
3
|
+
|
|
4
|
+
if RSpecCandy::Switcher.rspec_version == 1
|
|
5
|
+
|
|
6
|
+
Spec::Runner.configure do |config|
|
|
7
|
+
config.append_before do
|
|
8
|
+
DatabaseCleaner.clean
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
else
|
|
13
|
+
|
|
14
|
+
RSpec.configure do |config|
|
|
15
|
+
config.before do
|
|
16
|
+
DatabaseCleaner.clean
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'tempfile'
|
|
2
|
+
|
|
1
3
|
class RSpecRemote
|
|
2
4
|
def self.run_describe_block(describe_block)
|
|
3
5
|
temp_path = nil
|
|
@@ -12,12 +14,16 @@ class RSpecRemote
|
|
|
12
14
|
end
|
|
13
15
|
end
|
|
14
16
|
|
|
15
|
-
|
|
16
17
|
RSpecCandy::Switcher.define_matcher :pass_as_describe_block do
|
|
17
18
|
|
|
18
19
|
match do |describe_block|
|
|
19
20
|
rspec_out = RSpecRemote.run_describe_block(describe_block)
|
|
20
|
-
rspec_out.include?('0 failures')
|
|
21
|
+
passes = rspec_out.include?('0 failures')
|
|
22
|
+
# unless passes
|
|
23
|
+
# puts "Expected RSpec output to not have failures:"
|
|
24
|
+
# puts rspec_out
|
|
25
|
+
# end
|
|
26
|
+
passes
|
|
21
27
|
end
|
|
22
28
|
|
|
23
29
|
end
|
|
@@ -26,7 +32,12 @@ RSpecCandy::Switcher.define_matcher :fail_as_describe_block do
|
|
|
26
32
|
|
|
27
33
|
match do |describe_block|
|
|
28
34
|
rspec_out = RSpecRemote.run_describe_block(describe_block)
|
|
29
|
-
rspec_out.include?('1 failure')
|
|
35
|
+
passes = rspec_out.include?('1 failure')
|
|
36
|
+
# unless passes
|
|
37
|
+
# puts "Expected RSpec output to not have failures:"
|
|
38
|
+
# puts rspec_out
|
|
39
|
+
# end
|
|
40
|
+
passes
|
|
30
41
|
end
|
|
31
42
|
|
|
32
43
|
end
|
|
@@ -15,6 +15,7 @@ RSpecCandy::Switcher.define_matcher :pass_as_example do
|
|
|
15
15
|
|
|
16
16
|
match do |example|
|
|
17
17
|
rspec_out = RSpecRemote.run_example(example)
|
|
18
|
+
# puts rspec_out
|
|
18
19
|
rspec_out.include?('0 failures')
|
|
19
20
|
end
|
|
20
21
|
|
|
@@ -24,6 +25,7 @@ RSpecCandy::Switcher.define_matcher :fail_as_example do
|
|
|
24
25
|
|
|
25
26
|
match do |example|
|
|
26
27
|
rspec_out = RSpecRemote.run_example(example)
|
|
28
|
+
# puts rspec_out
|
|
27
29
|
rspec_out.include?('1 failure')
|
|
28
30
|
end
|
|
29
31
|
|
|
@@ -19,3 +19,22 @@ class Model < ActiveRecord::Base
|
|
|
19
19
|
def around_save_callback2; yield; end
|
|
20
20
|
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class StiParent < ActiveRecord::Base
|
|
25
|
+
|
|
26
|
+
self.table_name = 'sti_models'
|
|
27
|
+
|
|
28
|
+
before_save :crash
|
|
29
|
+
validate :crash
|
|
30
|
+
|
|
31
|
+
def crash
|
|
32
|
+
raise 'callback was run'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class StiChild < StiParent
|
|
39
|
+
|
|
40
|
+
end
|
metadata
CHANGED
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec_candy
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
prerelease:
|
|
6
|
-
segments:
|
|
7
|
-
- 0
|
|
8
|
-
- 3
|
|
9
|
-
- 1
|
|
10
|
-
version: 0.3.1
|
|
11
6
|
platform: ruby
|
|
12
|
-
authors:
|
|
7
|
+
authors:
|
|
13
8
|
- Henning Koch
|
|
14
9
|
- Tobias Kraze
|
|
15
10
|
autorequire:
|
|
16
11
|
bindir: bin
|
|
17
12
|
cert_chain: []
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
dependencies:
|
|
22
|
-
- !ruby/object:Gem::Dependency
|
|
13
|
+
date: 2015-04-08 00:00:00.000000000 Z
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
23
16
|
name: rspec
|
|
24
|
-
|
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
|
26
18
|
none: false
|
|
27
|
-
requirements:
|
|
28
|
-
- -
|
|
29
|
-
- !ruby/object:Gem::Version
|
|
30
|
-
|
|
31
|
-
segments:
|
|
32
|
-
- 0
|
|
33
|
-
version: "0"
|
|
19
|
+
requirements:
|
|
20
|
+
- - ! '>='
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: '0'
|
|
34
23
|
type: :runtime
|
|
35
|
-
version_requirements: *id001
|
|
36
|
-
- !ruby/object:Gem::Dependency
|
|
37
|
-
name: sneaky-save
|
|
38
24
|
prerelease: false
|
|
39
|
-
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
none: false
|
|
27
|
+
requirements:
|
|
28
|
+
- - ! '>='
|
|
29
|
+
- !ruby/object:Gem::Version
|
|
30
|
+
version: '0'
|
|
31
|
+
- !ruby/object:Gem::Dependency
|
|
32
|
+
name: sneaky-save
|
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
|
40
34
|
none: false
|
|
41
|
-
requirements:
|
|
42
|
-
- -
|
|
43
|
-
- !ruby/object:Gem::Version
|
|
44
|
-
|
|
45
|
-
segments:
|
|
46
|
-
- 0
|
|
47
|
-
version: "0"
|
|
35
|
+
requirements:
|
|
36
|
+
- - ! '>='
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
48
39
|
type: :runtime
|
|
49
|
-
|
|
40
|
+
prerelease: false
|
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
+
none: false
|
|
43
|
+
requirements:
|
|
44
|
+
- - ! '>='
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
50
47
|
description: RSpec helpers and matchers we use in our daily work at makandra.
|
|
51
48
|
email: henning.koch@makandra.de
|
|
52
49
|
executables: []
|
|
53
|
-
|
|
54
50
|
extensions: []
|
|
55
|
-
|
|
56
51
|
extra_rdoc_files: []
|
|
57
|
-
|
|
58
|
-
files:
|
|
52
|
+
files:
|
|
59
53
|
- .gitignore
|
|
54
|
+
- .ruby-version
|
|
60
55
|
- .travis.yml
|
|
61
56
|
- LICENSE
|
|
62
57
|
- README.md
|
|
63
58
|
- Rakefile
|
|
59
|
+
- gemfiles/Gemfile.rspec1-rails2
|
|
60
|
+
- gemfiles/Gemfile.rspec1-rails2.lock
|
|
61
|
+
- gemfiles/Gemfile.rspec2-rails3
|
|
62
|
+
- gemfiles/Gemfile.rspec2-rails3.lock
|
|
63
|
+
- gemfiles/Gemfile.rspec3-rails4
|
|
64
|
+
- gemfiles/Gemfile.rspec3-rails4.lock
|
|
64
65
|
- lib/rspec_candy.rb
|
|
65
66
|
- lib/rspec_candy/all.rb
|
|
66
67
|
- lib/rspec_candy/base.rb
|
|
@@ -83,100 +84,50 @@ files:
|
|
|
83
84
|
- lib/rspec_candy/switcher.rb
|
|
84
85
|
- lib/rspec_candy/version.rb
|
|
85
86
|
- rspec_candy.gemspec
|
|
86
|
-
- spec/
|
|
87
|
-
- spec/
|
|
88
|
-
- spec/
|
|
89
|
-
- spec/
|
|
90
|
-
- spec/
|
|
91
|
-
- spec/
|
|
92
|
-
- spec/
|
|
93
|
-
- spec/
|
|
94
|
-
- spec/
|
|
95
|
-
- spec/
|
|
96
|
-
- spec/
|
|
97
|
-
- spec/
|
|
98
|
-
- spec/
|
|
99
|
-
- spec/
|
|
100
|
-
- spec/
|
|
101
|
-
- spec/
|
|
102
|
-
- spec/
|
|
103
|
-
- spec/
|
|
104
|
-
- spec/
|
|
105
|
-
- spec/
|
|
106
|
-
- spec/
|
|
107
|
-
- spec/rspec2/app_root/config/database.yml
|
|
108
|
-
- spec/rspec2/app_root/config/environment.rb
|
|
109
|
-
- spec/rspec2/app_root/config/environments/test.rb
|
|
110
|
-
- spec/rspec2/app_root/config/initializers/backtrace_silencers.rb
|
|
111
|
-
- spec/rspec2/app_root/config/initializers/inflections.rb
|
|
112
|
-
- spec/rspec2/app_root/config/initializers/mime_types.rb
|
|
113
|
-
- spec/rspec2/app_root/config/initializers/secret_token.rb
|
|
114
|
-
- spec/rspec2/app_root/config/initializers/session_store.rb
|
|
115
|
-
- spec/rspec2/app_root/config/initializers/state_machine.rb
|
|
116
|
-
- spec/rspec2/app_root/config/locales/en.yml
|
|
117
|
-
- spec/rspec2/app_root/config/routes.rb
|
|
118
|
-
- spec/rspec2/app_root/log/.gitkeep
|
|
119
|
-
- spec/rspec2/rcov.opts
|
|
120
|
-
- spec/rspec2/spec/spec_helper.rb
|
|
121
|
-
- spec/rspec2/spec/switcher_spec.rb
|
|
122
|
-
- spec/shared/app_root/app/controllers/application_controller.rb
|
|
123
|
-
- spec/shared/app_root/app/models/model.rb
|
|
124
|
-
- spec/shared/app_root/app/models/state_machine_model.rb
|
|
125
|
-
- spec/shared/app_root/app/models/sti_child.rb
|
|
126
|
-
- spec/shared/app_root/app/models/sti_parent.rb
|
|
127
|
-
- spec/shared/app_root/config/initializers/state_machine.rb
|
|
128
|
-
- spec/shared/app_root/db/migrate/001_create_model.rb
|
|
129
|
-
- spec/shared/app_root/db/migrate/002_create_state_machine_model.rb
|
|
130
|
-
- spec/shared/app_root/db/migrate/003_create_sti_model.rb
|
|
131
|
-
- spec/shared/rspec_candy/helpers/disposable_copy_spec.rb
|
|
132
|
-
- spec/shared/rspec_candy/helpers/it_should_act_like_spec.rb
|
|
133
|
-
- spec/shared/rspec_candy/helpers/new_with_stubs_spec.rb
|
|
134
|
-
- spec/shared/rspec_candy/helpers/rails/it_should_run_callbacks_spec.rb
|
|
135
|
-
- spec/shared/rspec_candy/helpers/rails/prevent_storage_spec.rb
|
|
136
|
-
- spec/shared/rspec_candy/helpers/rails/store_with_values_spec.rb
|
|
137
|
-
- spec/shared/rspec_candy/helpers/should_receive_and_execute_spec.rb
|
|
138
|
-
- spec/shared/rspec_candy/helpers/should_receive_and_return_spec.rb
|
|
139
|
-
- spec/shared/rspec_candy/helpers/should_receive_chain_spec.rb
|
|
140
|
-
- spec/shared/rspec_candy/helpers/stub_any_instance_spec.rb
|
|
141
|
-
- spec/shared/rspec_candy/helpers/stub_existing_spec.rb
|
|
142
|
-
- spec/shared/rspec_candy/matchers/be_same_number_as_spec.rb
|
|
143
|
-
- spec/shared/rspec_candy/matchers/be_same_second_as_spec.rb
|
|
144
|
-
- spec/shared/rspec_candy/matchers/include_hash_spec.rb
|
|
145
|
-
- spec/shared/support/matchers/pass_as_describe_block.rb
|
|
146
|
-
- spec/shared/support/matchers/pass_as_example.rb
|
|
147
|
-
has_rdoc: true
|
|
87
|
+
- spec/rspec_candy/helpers/disposable_copy_spec.rb
|
|
88
|
+
- spec/rspec_candy/helpers/it_should_act_like_spec.rb
|
|
89
|
+
- spec/rspec_candy/helpers/new_with_stubs_spec.rb
|
|
90
|
+
- spec/rspec_candy/helpers/rails/it_should_run_callbacks_spec.rb
|
|
91
|
+
- spec/rspec_candy/helpers/rails/prevent_storage_spec.rb
|
|
92
|
+
- spec/rspec_candy/helpers/rails/store_with_values_spec.rb
|
|
93
|
+
- spec/rspec_candy/helpers/should_receive_and_execute_spec.rb
|
|
94
|
+
- spec/rspec_candy/helpers/should_receive_and_return_spec.rb
|
|
95
|
+
- spec/rspec_candy/helpers/should_receive_chain_spec.rb
|
|
96
|
+
- spec/rspec_candy/helpers/stub_any_instance_spec.rb
|
|
97
|
+
- spec/rspec_candy/helpers/stub_existing_spec.rb
|
|
98
|
+
- spec/rspec_candy/matchers/be_same_number_as_spec.rb
|
|
99
|
+
- spec/rspec_candy/matchers/be_same_second_as_spec.rb
|
|
100
|
+
- spec/rspec_candy/matchers/include_hash_spec.rb
|
|
101
|
+
- spec/shared_examples/.keep
|
|
102
|
+
- spec/spec_helper.rb
|
|
103
|
+
- spec/support/database.rb
|
|
104
|
+
- spec/support/database_cleaner.rb
|
|
105
|
+
- spec/support/matchers/pass_as_describe_block.rb
|
|
106
|
+
- spec/support/matchers/pass_as_example.rb
|
|
107
|
+
- spec/support/models.rb
|
|
148
108
|
homepage: https://github.com/makandra/rspec_candy
|
|
149
|
-
licenses:
|
|
109
|
+
licenses:
|
|
150
110
|
- MIT
|
|
151
111
|
post_install_message:
|
|
152
112
|
rdoc_options: []
|
|
153
|
-
|
|
154
|
-
require_paths:
|
|
113
|
+
require_paths:
|
|
155
114
|
- lib
|
|
156
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
116
|
none: false
|
|
158
|
-
requirements:
|
|
159
|
-
- -
|
|
160
|
-
- !ruby/object:Gem::Version
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
- 0
|
|
164
|
-
version: "0"
|
|
165
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
|
+
requirements:
|
|
118
|
+
- - ! '>='
|
|
119
|
+
- !ruby/object:Gem::Version
|
|
120
|
+
version: '0'
|
|
121
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
122
|
none: false
|
|
167
|
-
requirements:
|
|
168
|
-
- -
|
|
169
|
-
- !ruby/object:Gem::Version
|
|
170
|
-
|
|
171
|
-
segments:
|
|
172
|
-
- 0
|
|
173
|
-
version: "0"
|
|
123
|
+
requirements:
|
|
124
|
+
- - ! '>='
|
|
125
|
+
- !ruby/object:Gem::Version
|
|
126
|
+
version: '0'
|
|
174
127
|
requirements: []
|
|
175
|
-
|
|
176
128
|
rubyforge_project:
|
|
177
|
-
rubygems_version: 1.
|
|
129
|
+
rubygems_version: 1.8.25
|
|
178
130
|
signing_key:
|
|
179
131
|
specification_version: 3
|
|
180
132
|
summary: RSpec helpers and matchers we use in our daily work at makandra.
|
|
181
133
|
test_files: []
|
|
182
|
-
|