foundation_rails_helper 0.5.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,7 @@ module FoundationRailsSpecHelper
29
29
 
30
30
  def active_model_validator(kind, attributes, options = {})
31
31
  validator = mock("ActiveModel::Validations::#{kind.to_s.titlecase}Validator", :attributes => attributes, :options => options)
32
- validator.stub!(:kind).and_return(kind)
32
+ allow(validator).to receive(:kind).and_return(kind)
33
33
  validator
34
34
  end
35
35
 
@@ -90,54 +90,54 @@ module FoundationRailsSpecHelper
90
90
  def new_author_path(*args); "/authors/new"; end
91
91
 
92
92
  @author = ::Author.new
93
- @author.stub!(:class).and_return(::Author)
94
- @author.stub!(:to_label).and_return('Fred Smith')
95
- @author.stub!(:login).and_return('fred_smith')
96
- @author.stub!(:email).and_return('fred@foo.com')
97
- @author.stub!(:url).and_return('http://example.com')
98
- @author.stub!(:some_number).and_return('42')
99
- @author.stub!(:phone).and_return('317 456 2564')
100
- @author.stub!(:password).and_return('secret')
101
- @author.stub!(:active).and_return(true)
102
- @author.stub!(:description).and_return('bla bla bla')
103
- @author.stub!(:avatar).and_return('avatar.png')
104
- @author.stub!(:birthdate).and_return(DateTime.parse("1969-06-18 20:30"))
105
- @author.stub!(:id).and_return(37)
106
- @author.stub!(:new_record?).and_return(false)
107
- @author.stub!(:errors).and_return(mock('errors', :[] => nil))
108
- @author.stub!(:to_key).and_return(nil)
109
- @author.stub!(:persisted?).and_return(nil)
110
- @author.stub!(:time_zone).and_return("Perth")
111
- @author.stub!(:publish_date).and_return(Date.new( 2000, 1, 1 ))
112
- @author.stub!(:forty_two).and_return(@author.birthdate + 42.years)
113
- @author.stub!(:favorite_color).and_return("#424242")
114
- @author.stub!(:favorite_book).and_return()
93
+ allow(@author).to receive(:class).and_return(::Author)
94
+ allow(@author).to receive(:to_label).and_return('Fred Smith')
95
+ allow(@author).to receive(:login).and_return('fred_smith')
96
+ allow(@author).to receive(:email).and_return('fred@foo.com')
97
+ allow(@author).to receive(:url).and_return('http://example.com')
98
+ allow(@author).to receive(:some_number).and_return('42')
99
+ allow(@author).to receive(:phone).and_return('317 456 2564')
100
+ allow(@author).to receive(:password).and_return('secret')
101
+ allow(@author).to receive(:active).and_return(true)
102
+ allow(@author).to receive(:description).and_return('bla bla bla')
103
+ allow(@author).to receive(:avatar).and_return('avatar.png')
104
+ allow(@author).to receive(:birthdate).and_return(DateTime.parse("1969-06-18 20:30"))
105
+ allow(@author).to receive(:id).and_return(37)
106
+ allow(@author).to receive(:new_record?).and_return(false)
107
+ allow(@author).to receive(:errors).and_return(double('errors', :[] => nil))
108
+ allow(@author).to receive(:to_key).and_return(nil)
109
+ allow(@author).to receive(:persisted?).and_return(nil)
110
+ allow(@author).to receive(:time_zone).and_return("Perth")
111
+ allow(@author).to receive(:publish_date).and_return(Date.new( 2000, 1, 1 ))
112
+ allow(@author).to receive(:forty_two).and_return(@author.birthdate + 42.years)
113
+ allow(@author).to receive(:favorite_color).and_return("#424242")
114
+ allow(@author).to receive(:favorite_book).and_return(nil)
115
115
 
116
116
  @book_0 = ::Book.new
117
- @book_0.stub!(:id).and_return("78")
118
- @book_0.stub!(:title).and_return("Gulliver's Travels")
117
+ allow(@book_0).to receive(:id).and_return("78")
118
+ allow(@book_0).to receive(:title).and_return("Gulliver's Travels")
119
119
  @book_1 = ::Book.new
120
- @book_1.stub!(:id).and_return("133")
121
- @book_1.stub!(:title).and_return("Treasure Island")
120
+ allow(@book_1).to receive(:id).and_return("133")
121
+ allow(@book_1).to receive(:title).and_return("Treasure Island")
122
122
  @genre_0 = ::Genre.new
123
- @genre_0.stub!(:name).and_return("Exploration")
124
- @genre_0.stub!(:books).and_return([@book_0])
123
+ allow(@genre_0).to receive(:name).and_return("Exploration")
124
+ allow(@genre_0).to receive(:books).and_return([@book_0])
125
125
  @genre_1 = ::Genre.new
126
- @genre_1.stub!(:name).and_return("Pirate Exploits")
127
- @genre_1.stub!(:books).and_return([@book_1])
128
-
129
- ::Author.stub!(:scoped).and_return(::Author)
130
- ::Author.stub!(:find).and_return([@author])
131
- ::Author.stub!(:all).and_return([@author])
132
- ::Author.stub!(:where).and_return([@author])
133
- ::Author.stub!(:human_attribute_name).and_return { |column_name| column_name.to_s.humanize }
134
- ::Author.stub!(:human_name).and_return('::Author')
135
- ::Author.stub!(:content_columns).and_return([mock('column', :name => 'login'), mock('column', :name => 'created_at')])
136
- ::Author.stub!(:to_key).and_return(nil)
137
- ::Author.stub!(:persisted?).and_return(nil)
138
-
139
- ::Book.stub!(:all).and_return([@book_0, @book_1])
140
- ::Genre.stub!(:all).and_return([@genre_0, @genre_1])
126
+ allow(@genre_1).to receive(:name).and_return("Pirate Exploits")
127
+ allow(@genre_1).to receive(:books).and_return([@book_1])
128
+
129
+ allow(::Author).to receive(:scoped).and_return(::Author)
130
+ allow(::Author).to receive(:find).and_return([@author])
131
+ allow(::Author).to receive(:all).and_return([@author])
132
+ allow(::Author).to receive(:where).and_return([@author])
133
+ allow(::Author).to receive(:human_attribute_name) { |column_name| column_name.to_s.humanize }
134
+ allow(::Author).to receive(:human_name).and_return('::Author')
135
+ allow(::Author).to receive(:content_columns).and_return([double('column', :name => 'login'), double('column', :name => 'created_at')])
136
+ allow(::Author).to receive(:to_key).and_return(nil)
137
+ allow(::Author).to receive(:persisted?).and_return(nil)
138
+
139
+ allow(::Book).to receive(:all).and_return([@book_0, @book_1])
140
+ allow(::Genre).to receive(:all).and_return([@genre_0, @genre_1])
141
141
  end
142
142
 
143
143
  def self.included(base)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foundation_rails_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Gruhier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-10 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -116,20 +116,20 @@ dependencies:
116
116
  requirements:
117
117
  - - "~>"
118
118
  - !ruby/object:Gem::Version
119
- version: '2.8'
119
+ version: '3.1'
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 2.8.1
122
+ version: 3.1.0
123
123
  type: :development
124
124
  prerelease: false
125
125
  version_requirements: !ruby/object:Gem::Requirement
126
126
  requirements:
127
127
  - - "~>"
128
128
  - !ruby/object:Gem::Version
129
- version: '2.8'
129
+ version: '3.1'
130
130
  - - ">="
131
131
  - !ruby/object:Gem::Version
132
- version: 2.8.1
132
+ version: 3.1.0
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: capybara
135
135
  requirement: !ruby/object:Gem::Requirement
@@ -162,6 +162,7 @@ files:
162
162
  - ".rspec"
163
163
  - ".travis.yml"
164
164
  - CHANGELOG.md
165
+ - CONTRIBUTING.md
165
166
  - Gemfile
166
167
  - LICENSE
167
168
  - README.md
@@ -169,10 +170,12 @@ files:
169
170
  - foundation_rails_helper.gemspec
170
171
  - lib/foundation_rails_helper.rb
171
172
  - lib/foundation_rails_helper/action_view_extension.rb
173
+ - lib/foundation_rails_helper/configuration.rb
172
174
  - lib/foundation_rails_helper/flash_helper.rb
173
175
  - lib/foundation_rails_helper/form_builder.rb
174
176
  - lib/foundation_rails_helper/version.rb
175
177
  - lib/railtie.rb
178
+ - spec/foundation_rails_helper/configuration_spec.rb
176
179
  - spec/foundation_rails_helper/flash_helper_spec.rb
177
180
  - spec/foundation_rails_helper/form_builder_spec.rb
178
181
  - spec/spec_helper.rb
@@ -202,6 +205,7 @@ signing_key:
202
205
  specification_version: 4
203
206
  summary: Rails helpers for zurb foundation CSS framework
204
207
  test_files:
208
+ - spec/foundation_rails_helper/configuration_spec.rb
205
209
  - spec/foundation_rails_helper/flash_helper_spec.rb
206
210
  - spec/foundation_rails_helper/form_builder_spec.rb
207
211
  - spec/spec_helper.rb