listings 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,27 @@
1
1
  module RSpec::ListingsHelpers
2
2
  class FakeRoutes
3
- def listing_full_path(*options)
4
- "/"
5
- end
6
-
7
- def listing_full_url(*options)
8
- "/"
9
- end
10
-
11
- def listing_content_url(*options)
12
- "/"
3
+ # def listing_full_path(*options)
4
+ # "/"
5
+ # end
6
+
7
+ # def listing_full_url(*options)
8
+ # "/"
9
+ # end
10
+
11
+ # def listing_content_url(*options)
12
+ # "/"
13
+ # end
14
+
15
+ # def listing_export_url(*options)
16
+ # "/"
17
+ # end
18
+
19
+ def method_missing(m, *args, &block)
20
+ if m.to_s.end_with?("_url") || m.to_s.end_with?("_path")
21
+ "/"
22
+ else
23
+ super
24
+ end
13
25
  end
14
26
  end
15
27
 
@@ -31,6 +43,10 @@ module RSpec::ListingsHelpers
31
43
  FakeRoutes.new
32
44
  end
33
45
 
46
+ context.class.send(:define_method, 'main_app') do
47
+ FakeRoutes.new # routes of the main_app
48
+ end
49
+
34
50
  context
35
51
  end
36
52
 
@@ -1,3 +1,3 @@
1
1
  module Listings
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: listings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
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: 2015-06-29 00:00:00.000000000 Z
12
+ date: 2015-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails