genspec 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- genspec (0.2.1)
4
+ genspec (0.2.2)
5
5
  i18n (>= 0.5.0)
6
6
  rspec (~> 2.6.0)
7
7
  sc-core-ext (~> 1.2.1)
@@ -33,7 +33,7 @@ module GenSpec
33
33
 
34
34
  if block_given?
35
35
  context "with arguments #{args.inspect}" do
36
- with_args(args, options)
36
+ with_args(generator_args + args, options)
37
37
  instance_eval(&block)
38
38
  end
39
39
  else
@@ -2,7 +2,7 @@ module GenSpec
2
2
  class Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 2
5
+ PATCH = 3
6
6
  RELEASE = nil
7
7
 
8
8
  STRING = (RELEASE ? [MAJOR, MINOR, PATCH, RELEASE] : [MAJOR, MINOR, PATCH]).join('.')
@@ -85,5 +85,16 @@ describe :test_rails3 do
85
85
  it "should generate file 'test_arg'" do
86
86
  subject.should generate('test_arg')
87
87
  end
88
+
89
+ # ...and a test of nested args
90
+ with_args "template_name" do
91
+ it "should generate file 'test_arg'" do
92
+ subject.should generate('test_arg')
93
+ end
94
+
95
+ it "should generate file 'template_name'" do
96
+ subject.should generate("template_name")
97
+ end
98
+ end
88
99
  end
89
100
  end
@@ -8,6 +8,7 @@ class TestRails3 < base
8
8
  end
9
9
 
10
10
  argument :argument1, :type => :string, :default => "default_file"
11
+ argument :template_name, :type => :string, :default => "file_template"
11
12
 
12
13
  def gen_file_with_arg
13
14
  create_file argument1, "content!"
@@ -18,7 +19,7 @@ class TestRails3 < base
18
19
  end
19
20
 
20
21
  def gen_template
21
- template 'file', 'file_template'
22
+ template 'file', template_name
22
23
  end
23
24
 
24
25
  def gen_gem_source
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: genspec
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.2
5
+ version: 0.2.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Colin MacKenzie IV