dupe 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,12 +3,18 @@ class DupeGenerator < Rails::Generator::Base
3
3
  record do |m|
4
4
  # make sure the features and features/support directories exist
5
5
  m.directory 'features/support'
6
+ m.directory 'features/dupe'
7
+ m.directory 'features/dupe/custom_mocks'
8
+ m.directory 'features/dupe/definitions'
6
9
 
7
- # copy the custom_mocks.rb example file into features/support
8
- m.template 'custom_mocks.rb', 'features/support/custom_mocks.rb'
10
+ # copy the custom_mocks.rb example file into features/dupe/custom_mocks
11
+ m.template 'custom_mocks.rb', 'features/dupe/custom_mocks/custom_mocks.rb'
9
12
 
10
- # copy the dupe_setup.rb example file into features/support
11
- m.template 'dupe_setup.rb', 'features/support/dupe_setup.rb'
13
+ # copy the definitions.rb example file into features/dupe/definitions
14
+ m.template 'definitions.rb', 'features/dupe/definitions/definitions.rb'
15
+
16
+ # copy the load_dupe.rb into the features/support directory
17
+ m.template 'load_dupe.rb', 'features/support/load_dupe.rb'
12
18
  end
13
19
  end
14
20
  end
@@ -0,0 +1,9 @@
1
+ # set this to false if you don't care to see the requests mocked
2
+ # for each cucumber scenario.
3
+ Dupe.debug = true
4
+
5
+
6
+ # Define your models
7
+ # Dupe.define :example_model do |attrs|
8
+ # attrs.example_attribute 'Example Default Value'
9
+ # end
@@ -0,0 +1,9 @@
1
+ # First, load the definitions
2
+ Dir[File.join(File.dirname(__FILE__), '../dupe/definitions/*.rb')].each do |file|
3
+ require file
4
+ end
5
+
6
+ # next, load the custom mocks
7
+ Dir[File.join(File.dirname(__FILE__), '../dupe/custom_mocks/*.rb')].each do |file|
8
+ require file
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dupe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Parker
@@ -55,7 +55,8 @@ files:
55
55
  - lib/dupe/symbol.rb
56
56
  - rails_generators/dupe/dupe_generator.rb
57
57
  - rails_generators/dupe/templates/custom_mocks.rb
58
- - rails_generators/dupe/templates/dupe_setup.rb
58
+ - rails_generators/dupe/templates/definitions.rb
59
+ - rails_generators/dupe/templates/load_dupe.rb
59
60
  has_rdoc: true
60
61
  homepage: http://github.com/moonmaster9000/dupe
61
62
  licenses: []
@@ -1,3 +0,0 @@
1
- # set this to false if you don't care to see the requests mocked
2
- # for each cucumber scenario.
3
- Dupe.debug = true