crudspec 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +46 -49
- data/lib/crudspec/version.rb +1 -1
- data/lib/generators/spec_generator.rb +1 -1
- data/lib/generators/templates/controller_spec.rb +2 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
crudspec (0.1.
|
4
|
+
crudspec (0.1.1)
|
5
5
|
rails
|
6
6
|
rspec
|
7
7
|
|
@@ -9,40 +9,39 @@ GEM
|
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
11
|
abstract (1.0.0)
|
12
|
-
actionmailer (3.0.
|
13
|
-
actionpack (= 3.0.
|
14
|
-
mail (~> 2.2.
|
15
|
-
actionpack (3.0.
|
16
|
-
activemodel (= 3.0.
|
17
|
-
activesupport (= 3.0.
|
12
|
+
actionmailer (3.0.3)
|
13
|
+
actionpack (= 3.0.3)
|
14
|
+
mail (~> 2.2.9)
|
15
|
+
actionpack (3.0.3)
|
16
|
+
activemodel (= 3.0.3)
|
17
|
+
activesupport (= 3.0.3)
|
18
18
|
builder (~> 2.1.2)
|
19
19
|
erubis (~> 2.6.6)
|
20
|
-
i18n (~> 0.4
|
20
|
+
i18n (~> 0.4)
|
21
21
|
rack (~> 1.2.1)
|
22
|
-
rack-mount (~> 0.6.
|
23
|
-
rack-test (~> 0.5.
|
22
|
+
rack-mount (~> 0.6.13)
|
23
|
+
rack-test (~> 0.5.6)
|
24
24
|
tzinfo (~> 0.3.23)
|
25
|
-
activemodel (3.0.
|
26
|
-
activesupport (= 3.0.
|
25
|
+
activemodel (3.0.3)
|
26
|
+
activesupport (= 3.0.3)
|
27
27
|
builder (~> 2.1.2)
|
28
|
-
i18n (~> 0.4
|
29
|
-
activerecord (3.0.
|
30
|
-
activemodel (= 3.0.
|
31
|
-
activesupport (= 3.0.
|
32
|
-
arel (~>
|
28
|
+
i18n (~> 0.4)
|
29
|
+
activerecord (3.0.3)
|
30
|
+
activemodel (= 3.0.3)
|
31
|
+
activesupport (= 3.0.3)
|
32
|
+
arel (~> 2.0.2)
|
33
33
|
tzinfo (~> 0.3.23)
|
34
|
-
activeresource (3.0.
|
35
|
-
activemodel (= 3.0.
|
36
|
-
activesupport (= 3.0.
|
37
|
-
activesupport (3.0.
|
38
|
-
arel (
|
39
|
-
activesupport (~> 3.0.0)
|
34
|
+
activeresource (3.0.3)
|
35
|
+
activemodel (= 3.0.3)
|
36
|
+
activesupport (= 3.0.3)
|
37
|
+
activesupport (3.0.3)
|
38
|
+
arel (2.0.4)
|
40
39
|
builder (2.1.2)
|
41
40
|
diff-lcs (1.1.2)
|
42
41
|
erubis (2.6.6)
|
43
42
|
abstract (>= 1.0.0)
|
44
43
|
i18n (0.4.2)
|
45
|
-
mail (2.2.
|
44
|
+
mail (2.2.10)
|
46
45
|
activesupport (>= 2.3.6)
|
47
46
|
i18n (~> 0.4.1)
|
48
47
|
mime-types (~> 1.16)
|
@@ -54,32 +53,30 @@ GEM
|
|
54
53
|
rack (>= 1.0.0)
|
55
54
|
rack-test (0.5.6)
|
56
55
|
rack (>= 1.0)
|
57
|
-
rails (3.0.
|
58
|
-
actionmailer (= 3.0.
|
59
|
-
actionpack (= 3.0.
|
60
|
-
activerecord (= 3.0.
|
61
|
-
activeresource (= 3.0.
|
62
|
-
activesupport (= 3.0.
|
63
|
-
bundler (~> 1.0
|
64
|
-
railties (= 3.0.
|
65
|
-
railties (3.0.
|
66
|
-
actionpack (= 3.0.
|
67
|
-
activesupport (= 3.0.
|
68
|
-
rake (>= 0.8.
|
69
|
-
thor (~> 0.14.
|
56
|
+
rails (3.0.3)
|
57
|
+
actionmailer (= 3.0.3)
|
58
|
+
actionpack (= 3.0.3)
|
59
|
+
activerecord (= 3.0.3)
|
60
|
+
activeresource (= 3.0.3)
|
61
|
+
activesupport (= 3.0.3)
|
62
|
+
bundler (~> 1.0)
|
63
|
+
railties (= 3.0.3)
|
64
|
+
railties (3.0.3)
|
65
|
+
actionpack (= 3.0.3)
|
66
|
+
activesupport (= 3.0.3)
|
67
|
+
rake (>= 0.8.7)
|
68
|
+
thor (~> 0.14.4)
|
70
69
|
rake (0.8.7)
|
71
|
-
rspec (2.0
|
72
|
-
rspec-core (~> 2.0
|
73
|
-
rspec-expectations (~> 2.0
|
74
|
-
rspec-mocks (~> 2.0
|
75
|
-
rspec-core (2.0
|
76
|
-
rspec-expectations (2.0
|
77
|
-
diff-lcs (
|
78
|
-
rspec-mocks (2.0
|
79
|
-
|
80
|
-
|
81
|
-
thor (0.14.4)
|
82
|
-
treetop (1.4.8)
|
70
|
+
rspec (2.1.0)
|
71
|
+
rspec-core (~> 2.1.0)
|
72
|
+
rspec-expectations (~> 2.1.0)
|
73
|
+
rspec-mocks (~> 2.1.0)
|
74
|
+
rspec-core (2.1.0)
|
75
|
+
rspec-expectations (2.1.0)
|
76
|
+
diff-lcs (~> 1.1.2)
|
77
|
+
rspec-mocks (2.1.0)
|
78
|
+
thor (0.14.6)
|
79
|
+
treetop (1.4.9)
|
83
80
|
polyglot (>= 0.3.1)
|
84
81
|
tzinfo (0.3.23)
|
85
82
|
|
data/lib/crudspec/version.rb
CHANGED
@@ -4,7 +4,7 @@ module Crudspec
|
|
4
4
|
argument :controller_name, :type => :string, :banner => 'controller_name'
|
5
5
|
source_root File.expand_path("../templates", __FILE__)
|
6
6
|
desc "Create a RSpec spec for a CRUD controller"
|
7
|
-
class_option :devise, :desc => "Include steps to authenticate via devise", :type => :string, :banner => "devise_model"
|
7
|
+
class_option :devise, :desc => "Include steps to authenticate via devise", :type => :string, :banner => "devise_model", :required => false
|
8
8
|
|
9
9
|
def generate_spec_file
|
10
10
|
underscored = controller_name.underscore
|
@@ -53,11 +53,12 @@ describe <%= @class_name %> do
|
|
53
53
|
context "The save is successful" do
|
54
54
|
before(:each) do
|
55
55
|
<%= @model_name.classify %>.should_receive(:new).and_return(@<%= @model_name %>)
|
56
|
-
@<%= @model_name %>.should_receive(:
|
56
|
+
@<%= @model_name %>.should_receive(:save).and_return(true)
|
57
57
|
end
|
58
58
|
|
59
59
|
it "redirects to the 'show' action" do
|
60
60
|
post :create, :<%= @model_name %> => @<%= @model_name %>.attributes
|
61
|
+
response.should redirect_to(<%= @model_name %>_path(@<%= @model_name %>)) # Put the right show path here
|
61
62
|
end
|
62
63
|
|
63
64
|
it "sets a flash message" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crudspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Padilla
|