coast 0.9.6 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Gemfile.lock +6 -10
  2. data/lib/coast/version.rb +1 -1
  3. data/test/test_coast.rb +26 -26
  4. metadata +10 -10
data/Gemfile.lock CHANGED
@@ -1,26 +1,22 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (3.2.9)
4
+ activesupport (3.2.11)
5
5
  i18n (~> 0.6)
6
6
  multi_json (~> 1.0)
7
- celluloid (0.12.3)
8
- facter (>= 1.6.12)
9
- timers (>= 1.0.0)
10
7
  coderay (1.0.8)
11
- facter (1.6.14)
12
8
  i18n (0.6.1)
13
9
  method_source (0.8.1)
14
- micro_mock (0.1.1)
15
- micro_test (0.3.0)
16
- celluloid
17
- multi_json (1.3.7)
10
+ micro_mock (1.0.0)
11
+ micro_test (0.3.5)
12
+ os
13
+ multi_json (1.5.0)
14
+ os (0.9.6)
18
15
  pry (0.9.10)
19
16
  coderay (~> 1.0.5)
20
17
  method_source (~> 0.8)
21
18
  slop (~> 3.3.1)
22
19
  slop (3.3.3)
23
- timers (1.0.1)
24
20
 
25
21
  PLATFORMS
26
22
  ruby
data/lib/coast/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coast
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.8"
3
3
  end
data/test/test_coast.rb CHANGED
@@ -15,21 +15,21 @@ class TestCoast < MicroTest::Test
15
15
  # Creates a mock model instance [ActiveRecord::Base].
16
16
  def self.mock_model
17
17
  mock = MicroMock.make.new
18
- mock.stub(:destroy) { @destroyed = true }
19
- mock.stub(:destroyed?) { @destroyed }
20
- mock.stub(:update_attributes) { |*args| @attributes_updated = true }
21
- mock.stub(:save) { |*args| @saved = true }
22
- mock.class.stub(:find) { |*args| TestCoast.mock_model }
23
- mock.class.stub(:all) { (1..5).map { TestCoast.mock_model } }
18
+ mock.def(:destroy) { @destroyed = true }
19
+ mock.def(:destroyed?) { @destroyed }
20
+ mock.def(:update_attributes) { |*args| @attributes_updated = true }
21
+ mock.def(:save) { |*args| @saved = true }
22
+ mock.class.def(:find) { |*args| TestCoast.mock_model }
23
+ mock.class.def(:all) { (1..5).map { TestCoast.mock_model } }
24
24
  mock
25
25
  end
26
26
 
27
27
  # Creates a mock request instance [ActionDispatch::Request].
28
28
  def self.mock_request
29
29
  mock = MicroMock.make.new
30
- mock.stub(:request) { @request ||= MicroMock.make.new }
31
- mock.stub(:params) { @params ||= {} }
32
- mock.stub(:flash) { @flash ||= {} }
30
+ mock.def(:request) { @request ||= MicroMock.make.new }
31
+ mock.def(:params) { @params ||= {} }
32
+ mock.def(:flash) { @flash ||= {} }
33
33
  mock
34
34
  end
35
35
 
@@ -37,29 +37,29 @@ class TestCoast < MicroTest::Test
37
37
  def self.mock_controller
38
38
  mock = MicroMock.make.new
39
39
  mock.class.send :include, Coast
40
- mock.stub(:authorize!) { |*args| @authorize_invoked = true }
41
- mock.stub(:authorize_invoked?) { @authorize_invoked }
42
- mock.stub(:respond_to) { |&block| @responded = true; block.call(format) }
43
- mock.stub(:responded?) { @responded }
44
- mock.stub(:render) { |*args| @performed = @rendered = true }
45
- mock.stub(:performed?) { @performed }
46
- mock.stub(:rendered?) { @rendered }
47
- mock.stub(:redirect_to) { |*args| @redirected = true; render }
48
- mock.stub(:redirected?) { @redirected }
49
- mock.stub(:request) { @request ||= TestCoast.mock_request }
50
- mock.stub(:params) { request.params }
51
- mock.stub(:flash) { request.flash }
52
- mock.stub(:format) { @format ||= TestCoast.mock_format }
53
- mock.stub(:root_url) { "/" }
40
+ mock.def(:authorize!) { |*args| @authorize_invoked = true }
41
+ mock.def(:authorize_invoked?) { @authorize_invoked }
42
+ mock.def(:respond_to) { |&block| @responded = true; block.call(format) }
43
+ mock.def(:responded?) { @responded }
44
+ mock.def(:render) { |*args| @performed = @rendered = true }
45
+ mock.def(:performed?) { @performed }
46
+ mock.def(:rendered?) { @rendered }
47
+ mock.def(:redirect_to) { |*args| @redirected = true; render }
48
+ mock.def(:redirected?) { @redirected }
49
+ mock.def(:request) { @request ||= TestCoast.mock_request }
50
+ mock.def(:params) { request.params }
51
+ mock.def(:flash) { request.flash }
52
+ mock.def(:format) { @format ||= TestCoast.mock_format }
53
+ mock.def(:root_url) { "/" }
54
54
  mock
55
55
  end
56
56
 
57
57
  # Creates a mock format instance [ActionController::MimeResponds::Collector].
58
58
  def self.mock_format
59
59
  mock = MicroMock.make.new
60
- mock.stub(:html) { |&block| @html = true; block.call if block }
61
- mock.stub(:xml) { |&block| @xml = true; block.call if block }
62
- mock.stub(:json) { |&block| @json = true; block.call if block }
60
+ mock.def(:html) { |&block| @html = true; block.call if block }
61
+ mock.def(:xml) { |&block| @xml = true; block.call if block }
62
+ mock.def(:json) { |&block| @json = true; block.call if block }
63
63
  mock
64
64
  end
65
65
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-27 00:00:00.000000000 Z
12
+ date: 2013-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -32,33 +32,33 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - '='
35
+ - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 0.3.0.rc4
37
+ version: '0.3'
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - '='
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 0.3.0.rc4
45
+ version: '0.3'
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: micro_mock
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - '='
51
+ - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 0.0.8
53
+ version: '1.0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - '='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.0.8
61
+ version: '1.0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: pry
64
64
  requirement: !ruby/object:Gem::Requirement