remarkable_rails 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -3,10 +3,22 @@
3
3
  Remarkable Rails is a collection of matchers to Rails. This package has some
4
4
  ActionController matchers and soon some ActionView matchers.
5
5
 
6
- Whenever using the Remarkable Rails gem and ActiveRecord, it will automatically
7
- add your ActiveRecord matchers. So just one line is needed to install both:
8
-
9
- sudo gem install remarkable_rails
6
+ Whenever using the Remarkable Rails gem, it will automatically add your ActiveRecord
7
+ matchers. So just one line is needed to install both:
8
+
9
+ sudo gem install remarkable_rails
10
+
11
+ If you are using Rails 2.3, you need to have this configuration on your
12
+ config/environments/test.rb:
13
+
14
+ config.gem "rspec", :lib => false
15
+ config.gem "rspec-rails", :lib => false
16
+ config.gem "remarkable_rails", :lib => false
17
+
18
+ And then require remarkable inside your spec_helper.rb, after "spec/rails":
19
+
20
+ require 'spec/rails'
21
+ require 'remarkable_rails'
10
22
 
11
23
  == Matchers & Macros
12
24
 
@@ -20,7 +20,7 @@ module Remarkable
20
20
  case template = @response.rendered[:template]
21
21
  when nil
22
22
  unless @response.rendered[:partials].empty?
23
- path_and_file(response.rendered[:partials].keys.first).join("/_")
23
+ path_and_file(@response.rendered[:partials].keys.first).join("/_")
24
24
  end
25
25
  when ::ActionView::Template
26
26
  template.path
data/locale/en.yml CHANGED
@@ -2,7 +2,8 @@ en:
2
2
  remarkable:
3
3
  action_controller:
4
4
  responding: "responding to #{{verb}} {{action}}"
5
- mime_type: "with {{format}}"
5
+ mime_type: "with {{format}}"
6
+
6
7
  assign_to:
7
8
  description: "assign {{names}}"
8
9
  expectations:
@@ -11,12 +12,14 @@ en:
11
12
  is_equal_value: "assign {{name}} to be equal to {{with}}, got {{assign_inspect}}"
12
13
  optionals:
13
14
  with_kind_of:
14
- positive: "with kind of {{value}}"
15
+ positive: "with kind of {{value}}"
16
+
15
17
  filter_params:
16
18
  description: "filter {{params}} parameters from log"
17
19
  expectations:
18
20
  respond_to_filter_params: "controller to respond to filter_parameters (controller is not filtering any parameter)"
19
- is_filtered: "{{param}} to be filtered, got no filtering"
21
+ is_filtered: "{{param}} to be filtered, got no filtering"
22
+
20
23
  redirect_to:
21
24
  description: "redirect to {{expected}}"
22
25
  expectations:
@@ -25,15 +28,16 @@ en:
25
28
  url_matches: "redirect to {{expected}}, got redirect to {{actual}}"
26
29
  optionals:
27
30
  with:
28
- positive: "with status {{inspect}}"
31
+ positive: "with status {{inspect}}"
32
+
29
33
  render_template:
30
34
  description: "render"
31
35
  expectations:
32
36
  rendered: "template {{template}} to be rendered, got no render"
33
37
  template_matches: "template {{template}} to be rendered, got {{actual_template}}"
34
38
  layout_matches: "to render with layout {{layout}}, got {{actual_layout}}"
35
- status_matches: "to render with {{with}}, got {{actual_status}}"
36
- body_matches: "to render with body equals to {{body}}, got {{actual_body}}"
39
+ status_matches: "to render with status {{with}}, got {{actual_status}}"
40
+ body_matches: "to render with body {{body}}, got {{actual_body}}"
37
41
  content_type_matches: "to render with content type {{content_type}}, got {{actual_content_type}}"
38
42
  optionals:
39
43
  template:
@@ -46,12 +50,13 @@ en:
46
50
  body:
47
51
  positive: "with body {{inspect}}"
48
52
  content_type:
49
- positive: "with content type {{inspect}}"
53
+ positive: "with content type {{inspect}}"
54
+
50
55
  respond_with:
51
56
  description: "respond"
52
57
  expectations:
53
- status_matches: "to respond with {{with}}, got {{actual_status}}"
54
- body_matches: "to respond with body equals to {{body}}, got {{actual_body}}"
58
+ status_matches: "to respond with status {{with}}, got {{actual_status}}"
59
+ body_matches: "to respond with body {{body}}, got {{actual_body}}"
55
60
  content_type_matches: "to respond with content type {{content_type}}, got {{actual_content_type}}"
56
61
  optionals:
57
62
  with:
@@ -59,12 +64,14 @@ en:
59
64
  body:
60
65
  positive: "with body {{inspect}}"
61
66
  content_type:
62
- positive: "with content type {{inspect}}"
67
+ positive: "with content type {{inspect}}"
68
+
63
69
  route:
64
70
  description: "route {{method}} {{path}} to/from {{options}}"
65
71
  expectations:
66
72
  map_to_path: "to map {{options}} to {{method}} {{path}}, got {{actual}}"
67
- generate_params: "to generate params {{options}} from {{method}} {{path}}, got {{actual}}"
73
+ generate_params: "to generate params {{options}} from {{method}} {{path}}, got {{actual}}"
74
+
68
75
  set_session:
69
76
  description: "set session variable {{keys}}"
70
77
  expectations:
@@ -74,7 +81,8 @@ en:
74
81
  is_equal_value: "session variable {{key}} to be set to {{to}}, got {{session_inspect}}"
75
82
  optionals:
76
83
  to:
77
- positive: "to {{inspect}}"
84
+ positive: "to {{inspect}}"
85
+
78
86
  set_the_flash:
79
87
  description: "set the flash message {{keys}}"
80
88
  expectations:
@@ -23,13 +23,13 @@ describe 'respond_with' do
23
23
 
24
24
  it 'should set status_matches? message' do
25
25
  @matcher.matches?(@controller)
26
- @matcher.failure_message.should == 'Expected to respond with :error, got 200'
26
+ @matcher.failure_message.should == 'Expected to respond with status :error, got 200'
27
27
  end
28
28
 
29
29
  it 'should set content_type_matches? message' do
30
30
  @matcher = respond_with(:success)
31
31
  @matcher.body(/anything/).matches?(@controller)
32
- @matcher.failure_message.should == 'Expected to respond with body equals to /anything/, got " "'
32
+ @matcher.failure_message.should == 'Expected to respond with body /anything/, got " "'
33
33
  end
34
34
 
35
35
  it 'should set content_type_matches? message' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remarkable_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Brando
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-04-15 00:00:00 +02:00
13
+ date: 2009-04-18 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -31,7 +31,7 @@ dependencies:
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 3.0.3
34
+ version: 3.0.4
35
35
  version:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: remarkable_activerecord
@@ -41,7 +41,7 @@ dependencies:
41
41
  requirements:
42
42
  - - ">="
43
43
  - !ruby/object:Gem::Version
44
- version: 3.0.3
44
+ version: 3.0.4
45
45
  version:
46
46
  description: "Remarkable Rails: collection of matchers and macros with I18n for Rails"
47
47
  email: