crudspec 0.1.1 → 0.1.2

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
- crudspec (0.1.0)
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.1)
13
- actionpack (= 3.0.1)
14
- mail (~> 2.2.5)
15
- actionpack (3.0.1)
16
- activemodel (= 3.0.1)
17
- activesupport (= 3.0.1)
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.1)
20
+ i18n (~> 0.4)
21
21
  rack (~> 1.2.1)
22
- rack-mount (~> 0.6.12)
23
- rack-test (~> 0.5.4)
22
+ rack-mount (~> 0.6.13)
23
+ rack-test (~> 0.5.6)
24
24
  tzinfo (~> 0.3.23)
25
- activemodel (3.0.1)
26
- activesupport (= 3.0.1)
25
+ activemodel (3.0.3)
26
+ activesupport (= 3.0.3)
27
27
  builder (~> 2.1.2)
28
- i18n (~> 0.4.1)
29
- activerecord (3.0.1)
30
- activemodel (= 3.0.1)
31
- activesupport (= 3.0.1)
32
- arel (~> 1.0.0)
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.1)
35
- activemodel (= 3.0.1)
36
- activesupport (= 3.0.1)
37
- activesupport (3.0.1)
38
- arel (1.0.1)
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.9)
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.1)
58
- actionmailer (= 3.0.1)
59
- actionpack (= 3.0.1)
60
- activerecord (= 3.0.1)
61
- activeresource (= 3.0.1)
62
- activesupport (= 3.0.1)
63
- bundler (~> 1.0.0)
64
- railties (= 3.0.1)
65
- railties (3.0.1)
66
- actionpack (= 3.0.1)
67
- activesupport (= 3.0.1)
68
- rake (>= 0.8.4)
69
- thor (~> 0.14.0)
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.1)
72
- rspec-core (~> 2.0.1)
73
- rspec-expectations (~> 2.0.1)
74
- rspec-mocks (~> 2.0.1)
75
- rspec-core (2.0.1)
76
- rspec-expectations (2.0.1)
77
- diff-lcs (>= 1.1.2)
78
- rspec-mocks (2.0.1)
79
- rspec-core (~> 2.0.1)
80
- rspec-expectations (~> 2.0.1)
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
 
@@ -1,3 +1,3 @@
1
1
  module Crudspec
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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(:create).and_return(true)
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: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Padilla