grimen-dry_scaffold 0.3.0 → 0.3.1

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/README.textile CHANGED
@@ -36,7 +36,7 @@ h4. Models
36
36
 
37
37
  h4. Testing
38
38
 
39
- * "*Shoulda*":http://github.com/thoughtbot/shoulda - Testing framework
39
+ * "*shoulda*":http://github.com/thoughtbot/shoulda - Testing framework
40
40
 
41
41
  h2. Features
42
42
 
data/TODO.textile CHANGED
@@ -5,6 +5,7 @@ h2. Next
5
5
  * Bug/Issue: InheritedResources functional testing issue.
6
6
  * Feature: RSpec-templates?
7
7
  * Optimization: Write even better functional tests for REST-actions. Goal: Killer-tests, i.e. "best practice"-tests. Suggestion: Routing, formats, ...
8
+ * Feature: Auto-detection of testing frameworks in working project.
8
9
 
9
10
  h2. Maybe
10
11
 
@@ -17,7 +18,7 @@ h2. Issues
17
18
 
18
19
  * Contact José regarding the InheritedResources-issue:
19
20
 
20
- 1) ActionController::RoutingError: parrot_url failed to generate from {:controller=>"parrots", :id=>#<Parrot id: nil, name: "Hello", created_at: "2009-07-21 18:53:25", updated_at: "2009-07-21 18:53:25">, :action=>"show"}, expected: {:controller=>"parrots", :action=>"show"}, diff: {:id=>#<Parrot id: nil, name: "Hello", created_at: "2009-07-21 18:53:25", updated_at: "2009-07-21 18:53:25">}
21
+ ActionController::RoutingError: parrot_url failed to generate from {:controller=>"parrots", :id=>#<Parrot id: nil, name: "Hello", created_at: "2009-07-21 18:53:25", updated_at: "2009-07-21 18:53:25">, :action=>"show"}, expected: {:controller=>"parrots", :action=>"show"}, diff: {:id=>#<Parrot id: nil, name: "Hello", created_at: "2009-07-21 18:53:25", updated_at: "2009-07-21 18:53:25">}
21
22
  (eval):16:in `parrot_url'
22
23
  /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/url_helpers.rb:194:in `resource_url'
23
24
  /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/base_helpers.rb:311:in `send'
@@ -37,14 +38,3 @@ h2. Issues
37
38
  post :create, :donkey => @donkey.attributes # <<<<<<<<<<<<< donkeys_controller_test.rb:8
38
39
  assert_response :redirect
39
40
  end
40
-
41
- 2) test_destroy_with_failure(DonkeysControllerTest) [/test/functional/donkeys_controller_test.rb:45]:
42
- <nil> expected to not be nil.
43
-
44
- test 'destroy with failure' do
45
- Donkey.any_instance.expects(:destroy).returns(false)
46
- @donkey = donkeys(:basic)
47
- delete :destroy, :id => @donkey.to_param
48
- assert_not_nil flash[:error] # <<<<<<<<<<<<< donkeys_controller_test.rb:45
49
- assert_response :redirect
50
- end
@@ -56,15 +56,7 @@ class DucksControllerTest < ActionController::TestCase
56
56
  should_assign_to flash[:notice]
57
57
  should_redirect_to 'ducks_path'
58
58
  end
59
- context 'with failure' do
60
- setup do
61
- Duck.any_instance.expects(:destroy).returns(false)
62
- @duck = Factory(:duck)
63
- delete :destroy, :id => @duck.to_param
64
- end
65
- should_assign_to flash[:error]
66
- should_redirect_to 'ducks_path'
67
- end
59
+ # Not possible: destroy with failure
68
60
  end
69
61
 
70
62
  context 'new' do
@@ -42,13 +42,7 @@ class DucksControllerTest < ActionController::TestCase
42
42
  assert_response :redirect
43
43
  end
44
44
 
45
- test 'destroy with failure' do
46
- Duck.any_instance.expects(:destroy).returns(false)
47
- @duck = ducks(:basic)
48
- delete :destroy, :id => @duck.to_param
49
- assert_not_nil flash[:error]
50
- assert_response :redirect
51
- end
45
+ # Not possible: destroy with failure
52
46
 
53
47
  test 'new' do
54
48
  get :new
@@ -1,5 +1,5 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper'))
2
-
1
+ require 'test_helper'
2
+
3
3
  class DucksHelperTest < ActionView::TestCase
4
4
 
5
5
  should 'test something' do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper'))
1
+ require 'test_helper'
2
2
 
3
3
  class DucksHelperTest < ActionView::TestCase
4
4
 
@@ -43,13 +43,7 @@ class <%= controller_class_name %>ControllerTest < ActionController::TestCase
43
43
  assert_response :redirect
44
44
  end
45
45
 
46
- test 'destroy with failure' do
47
- <%= class_name %>.any_instance.expects(:destroy).returns(false)
48
- <%= resource_instance %> = <%= build_object %>
49
- delete :destroy, :id => <%= resource_instance %>.to_param
50
- assert_not_nil flash[:error]
51
- assert_response :redirect
52
- end
46
+ # Not possible: destroy with failure
53
47
 
54
48
  <% end -%>
55
49
  <% if actions.include?(:new) -%>
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
-
2
+
3
3
  class <%= controller_class_name %>HelperTest < ActionView::TestCase
4
4
 
5
5
  should 'test something' do
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
-
2
+
3
3
  class <%= controller_class_name %>HelperTest < ActionView::TestCase
4
4
 
5
5
  test 'something' do
data/lib/dry_generator.rb CHANGED
@@ -43,10 +43,10 @@ class DryGenerator < Rails::Generator::NamedBase
43
43
  :skip_views => !CONFIG_OPTIONS['views'] || false,
44
44
  :layout => CONFIG_OPTIONS['layout'] || false,
45
45
  :fixtures => CONFIG_OPTIONS['fixtures'] || false,
46
- :fgirl => CONFIG_OPTIONS['factory_girl'] || false,
46
+ :factory_girl => CONFIG_OPTIONS['factory_girl'] || CONFIG_OPTIONS['fgirl'] || false,
47
47
  :machinist => CONFIG_OPTIONS['machinist'] || false,
48
- :odaddy => CONFIG_OPTIONS['object_daddy'] || false,
49
- :tunit => CONFIG_OPTIONS['test_unit'] || true,
48
+ :object_daddy => CONFIG_OPTIONS['object_daddy'] || CONFIG_OPTIONS['odaddy'] || false,
49
+ :test_unit => CONFIG_OPTIONS['test_unit'] || CONFIG_OPTIONS['tunit'] || true,
50
50
  :shoulda => CONFIG_OPTIONS['shoulda'] || false
51
51
  }.freeze
52
52
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grimen-dry_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Grimfelt
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-22 00:00:00 -07:00
12
+ date: 2009-08-18 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -95,6 +95,7 @@ files:
95
95
  - tasks/dry_scaffold.rake
96
96
  has_rdoc: false
97
97
  homepage: http://github.com/grimen/dry_scaffold/tree/master
98
+ licenses:
98
99
  post_install_message:
99
100
  rdoc_options:
100
101
  - --charset=UTF-8
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  requirements: []
116
117
 
117
118
  rubyforge_project:
118
- rubygems_version: 1.2.0
119
+ rubygems_version: 1.3.5
119
120
  signing_key:
120
121
  specification_version: 3
121
122
  summary: A DRYer scaffold generator for Rails. Generates dry semantic and standards compliant views, and dry RESTful controllers.