objective_spec 0.2.0
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/.gitignore +2 -0
- data/LICENSE +20 -0
- data/README.rdoc +13 -0
- data/Rakefile +59 -0
- data/TODO +6 -0
- data/VERSION +1 -0
- data/generators/objective_controller/USAGE +33 -0
- data/generators/objective_controller/objective_controller_generator.rb +45 -0
- data/generators/objective_controller/templates/controller_spec.rb +25 -0
- data/generators/objective_controller/templates/helper_spec.rb +11 -0
- data/generators/objective_controller/templates/view.html.haml +3 -0
- data/generators/objective_controller/templates/view_spec.rb +10 -0
- data/generators/objective_model/objective_model_generator.rb +40 -0
- data/generators/objective_model/templates/model_spec.rb +13 -0
- data/generators/objective_observer/objective_observer_generator.rb +16 -0
- data/generators/objective_observer/templates/observer.rb +2 -0
- data/generators/objective_observer/templates/observer_spec.rb +11 -0
- data/generators/objective_resource/.DS_Store +0 -0
- data/generators/objective_resource/objective_resource_generator.rb +172 -0
- data/generators/objective_resource/templates/.DS_Store +0 -0
- data/generators/objective_resource/templates/controller.rb +2 -0
- data/generators/objective_resource/templates/helper.rb +2 -0
- data/generators/objective_resource/templates/migration.rb +15 -0
- data/generators/objective_resource/templates/model.rb +2 -0
- data/generators/objective_resource/templates/rspec/functional_spec.rb +247 -0
- data/generators/objective_resource/templates/rspec/helper_spec.rb +11 -0
- data/generators/objective_resource/templates/rspec/routing_spec.rb +61 -0
- data/generators/objective_resource/templates/rspec/unit_spec.rb +10 -0
- data/generators/objective_resource/templates/rspec/views/edit_spec.rb +23 -0
- data/generators/objective_resource/templates/rspec/views/index_spec.rb +21 -0
- data/generators/objective_resource/templates/rspec/views/new_spec.rb +23 -0
- data/generators/objective_resource/templates/rspec/views/show_spec.rb +19 -0
- data/generators/objective_resource/templates/view__form.haml +5 -0
- data/generators/objective_resource/templates/view_edit.haml +11 -0
- data/generators/objective_resource/templates/view_index.haml +19 -0
- data/generators/objective_resource/templates/view_new.haml +9 -0
- data/generators/objective_resource/templates/view_show.haml +9 -0
- data/generators/objective_service/objective_service_generator.rb +22 -0
- data/generators/objective_service/templates/controller.rb +2 -0
- data/generators/objective_service/templates/controller_spec.rb +175 -0
- data/generators/objective_spec/objective_spec_generator.rb +33 -0
- data/generators/objective_spec/templates/support/common.rb +3 -0
- data/generators/objective_spec/templates/support/controller_spec_helper.rb +3 -0
- data/generators/objective_spec/templates/support/model_spec_helper.rb +3 -0
- data/generators/objective_spec/templates/support/shared_examples.rb +1 -0
- data/generators/objective_spec/templates/support/view_spec_helper.rb +3 -0
- data/generators/rspec_default_values.rb +28 -0
- data/init.rb +2 -0
- data/lib/objective_spec/assets.rb +2 -0
- data/lib/objective_spec/mailer_example_group.rb +14 -0
- data/lib/objective_spec/matchers/use_layout_matcher.rb +25 -0
- data/lib/objective_spec/matchers.rb +26 -0
- data/lib/objective_spec.rb +2 -0
- data/objective_spec.gemspec +95 -0
- data/spec/objective_spec_spec.rb +7 -0
- data/spec/spec_helper.rb +9 -0
- metadata +112 -0
@@ -0,0 +1,175 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper')
|
2
|
+
|
3
|
+
describe <%= class_name %>Controller do
|
4
|
+
describe "handling GET /<%= table_name %>" do
|
5
|
+
|
6
|
+
it "should be successful" do
|
7
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
8
|
+
<%= class_name.singularize %>.stub!(:find).and_return([<%= file_name %>])
|
9
|
+
get :index, :format => 'xml'
|
10
|
+
response.should be_success
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should find all <%= table_name %>" do
|
14
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
15
|
+
<%= class_name.singularize %>.should_receive(:find).with(:all).and_return([<%= file_name %>])
|
16
|
+
get :index, :format => 'xml'
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should assign the found <%= table_name %> for the view" do
|
20
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
21
|
+
<%= class_name.singularize %>.stub!(:find).and_return([<%= file_name %>])
|
22
|
+
get :index, :format => 'xml'
|
23
|
+
assigns[:<%= table_name %>].should == [<%= file_name %>]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "handling GET /<%= table_name %>/1" do
|
28
|
+
|
29
|
+
it "should be successful" do
|
30
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
31
|
+
<%= class_name.singularize %>.stub!(:find).and_return(<%= file_name %>)
|
32
|
+
get :show, :id => "1", :format => 'xml'
|
33
|
+
response.should be_success
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should find the <%= file_name %> requested" do
|
37
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
38
|
+
<%= class_name.singularize %>.should_receive(:find).with("1").and_return(<%= file_name %>)
|
39
|
+
get :show, :id => "1", :format => 'xml'
|
40
|
+
end
|
41
|
+
|
42
|
+
it "should assign the found <%= file_name %> for the view" do
|
43
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
44
|
+
<%= class_name.singularize %>.stub!(:find).and_return(<%= file_name %>)
|
45
|
+
get :show, :id => "1", :format => 'xml'
|
46
|
+
assigns[:<%= file_name %>].should equal(<%= file_name %>)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe "handling POST /<%= table_name %>" do
|
51
|
+
|
52
|
+
describe "with successful save" do
|
53
|
+
|
54
|
+
it "should create a new <%= file_name %>" do
|
55
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
56
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
57
|
+
<%= class_name.singularize %>.should_receive(:new).with({}).and_return(<%= file_name %>)
|
58
|
+
<%= file_name %>.should_receive(:save).and_return(true)
|
59
|
+
post :create, :<%= file_name %> => {}, :format => 'xml'
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should be successful" do
|
63
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
64
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
65
|
+
<%= class_name.singularize %>.stub!(:new).and_return(<%= file_name %>)
|
66
|
+
<%= file_name %>.should_receive(:save).and_return(true)
|
67
|
+
post :create, :<%= file_name %> => {}, :format => 'xml'
|
68
|
+
response.should be_success
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
describe "with failed save" do
|
74
|
+
|
75
|
+
it "should be unprocessable" do
|
76
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
77
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
78
|
+
<%= class_name.singularize %>.stub!(:new).and_return(<%= file_name %>)
|
79
|
+
<%= file_name %>.should_receive(:save).and_return(false)
|
80
|
+
post :create, :<%= file_name %> => {}, :format => 'xml'
|
81
|
+
response.code.should == '422'
|
82
|
+
end
|
83
|
+
|
84
|
+
it "should return errors" do
|
85
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
86
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
87
|
+
<%= class_name.singularize %>.stub!(:new).and_return(<%= file_name %>)
|
88
|
+
<%= file_name %>.should_receive(:save).and_return(false)
|
89
|
+
post :create, :<%= file_name %> => {}, :format => 'xml'
|
90
|
+
Nokogiri::XML(response.should).at('errors').should_not be_nil
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
describe "handling PUT /<%= table_name %>/1" do
|
97
|
+
|
98
|
+
describe "with successful update" do
|
99
|
+
|
100
|
+
it "should find the <%= file_name %> requested" do
|
101
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
102
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
103
|
+
<%= class_name.singularize %>.should_receive(:find).with("1").and_return(<%= file_name %>)
|
104
|
+
<%= file_name %>.should_receive(:update_attributes).and_return(true)
|
105
|
+
put :update, :id => "1", :format => 'xml'
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should update the found <%= file_name %>" do
|
109
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
110
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
111
|
+
<%= class_name.singularize %>.stub!(:find).and_return(<%= file_name %>)
|
112
|
+
<%= file_name %>.should_receive(:update_attributes).and_return(true)
|
113
|
+
put :update, :id => "1", :format => 'xml'
|
114
|
+
assigns(:<%= file_name %>).should equal(<%= file_name %>)
|
115
|
+
end
|
116
|
+
|
117
|
+
it "should assign the found <%= file_name %> for the view" do
|
118
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
119
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
120
|
+
<%= class_name.singularize %>.stub!(:find).and_return(<%= file_name %>)
|
121
|
+
<%= file_name %>.should_receive(:update_attributes).and_return(true)
|
122
|
+
put :update, :id => "1", :format => 'xml'
|
123
|
+
assigns(:<%= file_name %>).should equal(<%= file_name %>)
|
124
|
+
end
|
125
|
+
|
126
|
+
it "should be successful" do
|
127
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
128
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
129
|
+
<%= class_name.singularize %>.stub!(:find).and_return(<%= file_name %>)
|
130
|
+
<%= file_name %>.should_receive(:update_attributes).and_return(true)
|
131
|
+
put :update, :id => "1", :format => 'xml'
|
132
|
+
response.should be_success
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
136
|
+
|
137
|
+
describe "with failed update" do
|
138
|
+
|
139
|
+
it "should render errors" do
|
140
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
141
|
+
<%= file_name %>.stub!(:to_param).and_return("1")
|
142
|
+
<%= class_name.singularize %>.stub!(:find).and_return(<%= file_name %>)
|
143
|
+
<%= file_name %>.should_receive(:update_attributes).and_return(false)
|
144
|
+
put :update, :id => "1", :format => 'xml'
|
145
|
+
Nokogiri::XML(response.body).at('errors').should_not be_nil
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe "handling DELETE /<%= table_name %>/1" do
|
152
|
+
|
153
|
+
it "should find the <%= file_name %> requested" do
|
154
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
155
|
+
<%= file_name %>.stub!(:destroy).and_return(true)
|
156
|
+
<%= class_name.singularize %>.should_receive(:find).with("1").and_return(<%= file_name %>)
|
157
|
+
delete :destroy, :id => "1", :format => 'xml'
|
158
|
+
end
|
159
|
+
|
160
|
+
it "should call destroy on the found <%= file_name %>" do
|
161
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
162
|
+
<%= class_name.singularize %>.stub!(:find).and_return(<%= file_name %>)
|
163
|
+
<%= file_name %>.should_receive(:destroy).and_return(true)
|
164
|
+
delete :destroy, :id => "1", :format => 'xml'
|
165
|
+
end
|
166
|
+
|
167
|
+
it "should succeed" do
|
168
|
+
<%= file_name %> = Factory(:<%= file_name %>)
|
169
|
+
<%= file_name %>.stub!(:destroy).and_return(true)
|
170
|
+
<%= class_name.singularize %>.stub!(:find).and_return(<%= file_name %>)
|
171
|
+
delete :destroy, :id => "1", :format => 'xml'
|
172
|
+
response.should be_success
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class ObjectiveSpecGenerator < Rails::Generator::Base
|
2
|
+
|
3
|
+
def initialize(runtime_args, runtime_options = {})
|
4
|
+
puts <<-INFO
|
5
|
+
|
6
|
+
You are installing Objective Spec. After this generator has completed, you
|
7
|
+
will need to add require 'objective_spec' to your spec/spec_helper.rb file
|
8
|
+
to load the library.
|
9
|
+
|
10
|
+
INFO
|
11
|
+
super
|
12
|
+
end
|
13
|
+
|
14
|
+
def manifest
|
15
|
+
record do |m|
|
16
|
+
m.directory 'spec/mailers'
|
17
|
+
m.directory 'spec/matchers'
|
18
|
+
m.directory 'spec/spec_helpers'
|
19
|
+
m.file 'spec_helpers/common.rb', 'spec/spec_helpers/common.rb'
|
20
|
+
m.file 'spec_helpers/model.rb', 'spec/spec_helpers/model.rb'
|
21
|
+
m.file 'spec_helpers/view.rb', 'spec/spec_helpers/view.rb'
|
22
|
+
m.file 'spec_helpers/controller.rb', 'spec/spec_helpers/controller.rb'
|
23
|
+
m.file 'spec_helpers/shared_examples.rb', 'spec/spec_helpers/shared_examples.rb'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
protected
|
28
|
+
|
29
|
+
def banner
|
30
|
+
"Usage: #{$0} objective_spec"
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# Include your shared examples in here
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Rails
|
2
|
+
module Generator
|
3
|
+
class GeneratedAttribute
|
4
|
+
def default_value
|
5
|
+
@default_value ||= case type
|
6
|
+
when :int, :integer then "1"
|
7
|
+
when :float then "1.5"
|
8
|
+
when :decimal then "9.99"
|
9
|
+
when :datetime, :timestamp, :time then "Time.now"
|
10
|
+
when :date then "Date.today"
|
11
|
+
when :string, :text then "\"value for #{@name}\""
|
12
|
+
when :boolean then "false"
|
13
|
+
when :belongs_to, :references then "1"
|
14
|
+
else
|
15
|
+
""
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def name_or_reference
|
20
|
+
if ::Rails::VERSION::STRING >= '2.2'
|
21
|
+
reference? ? :"#{name}_id" : name
|
22
|
+
else
|
23
|
+
name
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/init.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module Spec
|
2
|
+
module Rails
|
3
|
+
module Example
|
4
|
+
# Mailer examples live in $RAILS_ROOT/spec/mailers/.
|
5
|
+
#
|
6
|
+
# Mailer examples use Spec::Rails::Example::MailerExampleGroup, which
|
7
|
+
# provides support for fixtures and some custom expectations via extensions
|
8
|
+
# to ActiveRecord::Base.
|
9
|
+
class MailerExampleGroup < ActiveSupport::TestCase
|
10
|
+
Spec::Example::ExampleGroupFactory.register(:mailer, self)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class UseLayout
|
2
|
+
attr_reader :actual, :expected
|
3
|
+
|
4
|
+
def initialize(expected)
|
5
|
+
@expected = 'layouts/' + expected
|
6
|
+
end
|
7
|
+
|
8
|
+
def matches?(controller)
|
9
|
+
@actual = controller.layout
|
10
|
+
@actual == @expected
|
11
|
+
end
|
12
|
+
|
13
|
+
def failure_message
|
14
|
+
return "use_layout expected #{@expected.inspect}, got #{@actual.inspect}"
|
15
|
+
end
|
16
|
+
|
17
|
+
def negeative_failure_message
|
18
|
+
return "use_layout expected #{@expected.inspect} not to equal #{@actual.inspect}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
def use_layout(expected)
|
24
|
+
UseLayout.new(expected)
|
25
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module ObjectiveSpec
|
2
|
+
class Matchers
|
3
|
+
def load!
|
4
|
+
load_matchers_in_dir(bundled_matchers_dir)
|
5
|
+
end
|
6
|
+
|
7
|
+
def load_matchers_in_dir(dir)
|
8
|
+
Dir.entries(dir).each do |entry|
|
9
|
+
if entry =~ /_matcher.rb$/
|
10
|
+
filename = entry.gsub(/.rb$/, '')
|
11
|
+
require File.join(dir, filename)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def bundled_matchers_dir
|
17
|
+
File.join(File.dirname(__FILE__), 'matchers')
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.load!
|
21
|
+
self.new.load!
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
ObjectiveSpec::Matchers.load!
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{objective_spec}
|
8
|
+
s.version = "0.2.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Blake Watters"]
|
12
|
+
s.date = %q{2009-10-13}
|
13
|
+
s.email = %q{blake@objective3.com}
|
14
|
+
s.extra_rdoc_files = [
|
15
|
+
"LICENSE",
|
16
|
+
"README.rdoc"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".gitignore",
|
20
|
+
"LICENSE",
|
21
|
+
"README.rdoc",
|
22
|
+
"Rakefile",
|
23
|
+
"TODO",
|
24
|
+
"VERSION",
|
25
|
+
"generators/objective_controller/USAGE",
|
26
|
+
"generators/objective_controller/objective_controller_generator.rb",
|
27
|
+
"generators/objective_controller/templates/controller_spec.rb",
|
28
|
+
"generators/objective_controller/templates/helper_spec.rb",
|
29
|
+
"generators/objective_controller/templates/view.html.haml",
|
30
|
+
"generators/objective_controller/templates/view_spec.rb",
|
31
|
+
"generators/objective_model/objective_model_generator.rb",
|
32
|
+
"generators/objective_model/templates/model_spec.rb",
|
33
|
+
"generators/objective_observer/objective_observer_generator.rb",
|
34
|
+
"generators/objective_observer/templates/observer.rb",
|
35
|
+
"generators/objective_observer/templates/observer_spec.rb",
|
36
|
+
"generators/objective_resource/.DS_Store",
|
37
|
+
"generators/objective_resource/objective_resource_generator.rb",
|
38
|
+
"generators/objective_resource/templates/.DS_Store",
|
39
|
+
"generators/objective_resource/templates/controller.rb",
|
40
|
+
"generators/objective_resource/templates/helper.rb",
|
41
|
+
"generators/objective_resource/templates/migration.rb",
|
42
|
+
"generators/objective_resource/templates/model.rb",
|
43
|
+
"generators/objective_resource/templates/rspec/functional_spec.rb",
|
44
|
+
"generators/objective_resource/templates/rspec/helper_spec.rb",
|
45
|
+
"generators/objective_resource/templates/rspec/routing_spec.rb",
|
46
|
+
"generators/objective_resource/templates/rspec/unit_spec.rb",
|
47
|
+
"generators/objective_resource/templates/rspec/views/edit_spec.rb",
|
48
|
+
"generators/objective_resource/templates/rspec/views/index_spec.rb",
|
49
|
+
"generators/objective_resource/templates/rspec/views/new_spec.rb",
|
50
|
+
"generators/objective_resource/templates/rspec/views/show_spec.rb",
|
51
|
+
"generators/objective_resource/templates/view__form.haml",
|
52
|
+
"generators/objective_resource/templates/view_edit.haml",
|
53
|
+
"generators/objective_resource/templates/view_index.haml",
|
54
|
+
"generators/objective_resource/templates/view_new.haml",
|
55
|
+
"generators/objective_resource/templates/view_show.haml",
|
56
|
+
"generators/objective_service/objective_service_generator.rb",
|
57
|
+
"generators/objective_service/templates/controller.rb",
|
58
|
+
"generators/objective_service/templates/controller_spec.rb",
|
59
|
+
"generators/objective_spec/objective_spec_generator.rb",
|
60
|
+
"generators/objective_spec/templates/support/common.rb",
|
61
|
+
"generators/objective_spec/templates/support/controller_spec_helper.rb",
|
62
|
+
"generators/objective_spec/templates/support/model_spec_helper.rb",
|
63
|
+
"generators/objective_spec/templates/support/shared_examples.rb",
|
64
|
+
"generators/objective_spec/templates/support/view_spec_helper.rb",
|
65
|
+
"generators/rspec_default_values.rb",
|
66
|
+
"init.rb",
|
67
|
+
"lib/objective_spec.rb",
|
68
|
+
"lib/objective_spec/assets.rb",
|
69
|
+
"lib/objective_spec/mailer_example_group.rb",
|
70
|
+
"lib/objective_spec/matchers.rb",
|
71
|
+
"lib/objective_spec/matchers/use_layout_matcher.rb",
|
72
|
+
"objective_spec.gemspec",
|
73
|
+
"spec/objective_spec_spec.rb",
|
74
|
+
"spec/spec_helper.rb"
|
75
|
+
]
|
76
|
+
s.homepage = %q{http://github.com/Objective3/objective_spec}
|
77
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
78
|
+
s.require_paths = ["lib"]
|
79
|
+
s.rubygems_version = %q{1.3.5}
|
80
|
+
s.summary = %q{A set of extensions to RSpec for building Rails applications against Objective Spec}
|
81
|
+
s.test_files = [
|
82
|
+
"spec/objective_spec_spec.rb",
|
83
|
+
"spec/spec_helper.rb"
|
84
|
+
]
|
85
|
+
|
86
|
+
if s.respond_to? :specification_version then
|
87
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
88
|
+
s.specification_version = 3
|
89
|
+
|
90
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
91
|
+
else
|
92
|
+
end
|
93
|
+
else
|
94
|
+
end
|
95
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: objective_spec
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Blake Watters
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-10-13 00:00:00 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: blake@objective3.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.rdoc
|
25
|
+
files:
|
26
|
+
- .gitignore
|
27
|
+
- LICENSE
|
28
|
+
- README.rdoc
|
29
|
+
- Rakefile
|
30
|
+
- TODO
|
31
|
+
- VERSION
|
32
|
+
- generators/objective_controller/USAGE
|
33
|
+
- generators/objective_controller/objective_controller_generator.rb
|
34
|
+
- generators/objective_controller/templates/controller_spec.rb
|
35
|
+
- generators/objective_controller/templates/helper_spec.rb
|
36
|
+
- generators/objective_controller/templates/view.html.haml
|
37
|
+
- generators/objective_controller/templates/view_spec.rb
|
38
|
+
- generators/objective_model/objective_model_generator.rb
|
39
|
+
- generators/objective_model/templates/model_spec.rb
|
40
|
+
- generators/objective_observer/objective_observer_generator.rb
|
41
|
+
- generators/objective_observer/templates/observer.rb
|
42
|
+
- generators/objective_observer/templates/observer_spec.rb
|
43
|
+
- generators/objective_resource/.DS_Store
|
44
|
+
- generators/objective_resource/objective_resource_generator.rb
|
45
|
+
- generators/objective_resource/templates/.DS_Store
|
46
|
+
- generators/objective_resource/templates/controller.rb
|
47
|
+
- generators/objective_resource/templates/helper.rb
|
48
|
+
- generators/objective_resource/templates/migration.rb
|
49
|
+
- generators/objective_resource/templates/model.rb
|
50
|
+
- generators/objective_resource/templates/rspec/functional_spec.rb
|
51
|
+
- generators/objective_resource/templates/rspec/helper_spec.rb
|
52
|
+
- generators/objective_resource/templates/rspec/routing_spec.rb
|
53
|
+
- generators/objective_resource/templates/rspec/unit_spec.rb
|
54
|
+
- generators/objective_resource/templates/rspec/views/edit_spec.rb
|
55
|
+
- generators/objective_resource/templates/rspec/views/index_spec.rb
|
56
|
+
- generators/objective_resource/templates/rspec/views/new_spec.rb
|
57
|
+
- generators/objective_resource/templates/rspec/views/show_spec.rb
|
58
|
+
- generators/objective_resource/templates/view__form.haml
|
59
|
+
- generators/objective_resource/templates/view_edit.haml
|
60
|
+
- generators/objective_resource/templates/view_index.haml
|
61
|
+
- generators/objective_resource/templates/view_new.haml
|
62
|
+
- generators/objective_resource/templates/view_show.haml
|
63
|
+
- generators/objective_service/objective_service_generator.rb
|
64
|
+
- generators/objective_service/templates/controller.rb
|
65
|
+
- generators/objective_service/templates/controller_spec.rb
|
66
|
+
- generators/objective_spec/objective_spec_generator.rb
|
67
|
+
- generators/objective_spec/templates/support/common.rb
|
68
|
+
- generators/objective_spec/templates/support/controller_spec_helper.rb
|
69
|
+
- generators/objective_spec/templates/support/model_spec_helper.rb
|
70
|
+
- generators/objective_spec/templates/support/shared_examples.rb
|
71
|
+
- generators/objective_spec/templates/support/view_spec_helper.rb
|
72
|
+
- generators/rspec_default_values.rb
|
73
|
+
- init.rb
|
74
|
+
- lib/objective_spec.rb
|
75
|
+
- lib/objective_spec/assets.rb
|
76
|
+
- lib/objective_spec/mailer_example_group.rb
|
77
|
+
- lib/objective_spec/matchers.rb
|
78
|
+
- lib/objective_spec/matchers/use_layout_matcher.rb
|
79
|
+
- objective_spec.gemspec
|
80
|
+
- spec/objective_spec_spec.rb
|
81
|
+
- spec/spec_helper.rb
|
82
|
+
has_rdoc: true
|
83
|
+
homepage: http://github.com/Objective3/objective_spec
|
84
|
+
licenses: []
|
85
|
+
|
86
|
+
post_install_message:
|
87
|
+
rdoc_options:
|
88
|
+
- --charset=UTF-8
|
89
|
+
require_paths:
|
90
|
+
- lib
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: "0"
|
96
|
+
version:
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: "0"
|
102
|
+
version:
|
103
|
+
requirements: []
|
104
|
+
|
105
|
+
rubyforge_project:
|
106
|
+
rubygems_version: 1.3.5
|
107
|
+
signing_key:
|
108
|
+
specification_version: 3
|
109
|
+
summary: A set of extensions to RSpec for building Rails applications against Objective Spec
|
110
|
+
test_files:
|
111
|
+
- spec/objective_spec_spec.rb
|
112
|
+
- spec/spec_helper.rb
|