rspec-apotomo 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.mkd
CHANGED
@@ -59,7 +59,16 @@ module RSpec::Rails
|
|
59
59
|
def rendered
|
60
60
|
@last_invoke
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
|
+
def method_missing(method, *args, &block)
|
64
|
+
# Send the route helpers to the application router.
|
65
|
+
if @routes && @routes.named_routes.helpers.include?(method)
|
66
|
+
@controller.send(method, *args, &block)
|
67
|
+
else
|
68
|
+
super
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
63
72
|
attr_reader :controller, :routes
|
64
73
|
include ::Apotomo::WidgetShortcuts
|
65
74
|
end
|
@@ -31,6 +31,13 @@ module RSpec::Rails
|
|
31
31
|
it "should render a view" do
|
32
32
|
render_widget(:dummy).text.should == "Hey from DummyWidget! I should be mixed in properly from @routes\n"
|
33
33
|
end
|
34
|
+
|
35
|
+
it "should support _path helpers from the controller" do
|
36
|
+
# We have to stub include so that things determine the route exists.
|
37
|
+
Rails.application.routes.named_routes.helpers.stub(:include?).and_return(:true)
|
38
|
+
@controller.should_receive(:test_path).at_least(:once)
|
39
|
+
test_path
|
40
|
+
end
|
34
41
|
end
|
35
42
|
|
36
43
|
context "- ::has_widget" do
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
8
|
+
- 3
|
9
|
+
version: 0.9.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nick Sutterer
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-10-04 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|