@@ -42,39 +42,39 @@ def self._local_prefixes
42
42
43
43
44
44
describe "::controller_path" do
45
- it { ::BassistCell . new ( @controller ) . class . controller_path . must_equal "bassist" }
46
- it { SingerCell . new ( @controller ) . class . controller_path . must_equal "prefixes_test/singer" }
45
+ it { _ ( ::BassistCell . new ( @controller ) . class . controller_path ) . must_equal "bassist" }
46
+ it { _ ( SingerCell . new ( @controller ) . class . controller_path ) . must_equal "prefixes_test/singer" }
47
47
end
48
48
49
49
describe "#_prefixes" do
50
- it { ::BassistCell . new ( @controller ) . _prefixes . must_equal [ "test/fixtures/bassist" ] }
51
- it { ::BassistCell ::FenderCell . new ( @controller ) . _prefixes . must_equal [ "app/cells/bassist_cell/fender" ] }
52
- it { ::BassistCell ::IbanezCell . new ( @controller ) . _prefixes . must_equal [ "test/fixtures/bassist_cell/ibanez" , "test/fixtures/bassist" ] }
50
+ it { _ ( ::BassistCell . new ( @controller ) . _prefixes ) . must_equal [ "test/fixtures/bassist" ] }
51
+ it { _ ( ::BassistCell ::FenderCell . new ( @controller ) . _prefixes ) . must_equal [ "app/cells/bassist_cell/fender" ] }
52
+ it { _ ( ::BassistCell ::IbanezCell . new ( @controller ) . _prefixes ) . must_equal [ "test/fixtures/bassist_cell/ibanez" , "test/fixtures/bassist" ] }
53
53
54
- it { SingerCell . new ( @controller ) . _prefixes . must_equal [ "app/cells/prefixes_test/singer" ] }
55
- it { BackgroundVocalsCell . new ( @controller ) . _prefixes . must_equal [ "app/cells/prefixes_test/background_vocals" , "app/cells/prefixes_test/singer" ] }
56
- it { ChorusCell . new ( @controller ) . _prefixes . must_equal [ "app/cells/prefixes_test/chorus" , "app/cells/prefixes_test/background_vocals" , "app/cells/prefixes_test/singer" ] }
54
+ it { _ ( SingerCell . new ( @controller ) . _prefixes ) . must_equal [ "app/cells/prefixes_test/singer" ] }
55
+ it { _ ( BackgroundVocalsCell . new ( @controller ) . _prefixes ) . must_equal [ "app/cells/prefixes_test/background_vocals" , "app/cells/prefixes_test/singer" ] }
56
+ it { _ ( ChorusCell . new ( @controller ) . _prefixes ) . must_equal [ "app/cells/prefixes_test/chorus" , "app/cells/prefixes_test/background_vocals" , "app/cells/prefixes_test/singer" ] }
57
57
58
- it { GuitaristCell . new ( @controller ) . _prefixes . must_equal [ "stringer" , "app/cells/prefixes_test/singer" ] }
59
- it { BassistCell . new ( @controller ) . _prefixes . must_equal [ "app/cells/prefixes_test/bassist" , "basser" , "app/cells/prefixes_test/singer" ] }
58
+ it { _ ( GuitaristCell . new ( @controller ) . _prefixes ) . must_equal [ "stringer" , "app/cells/prefixes_test/singer" ] }
59
+ it { _ ( BassistCell . new ( @controller ) . _prefixes ) . must_equal [ "app/cells/prefixes_test/bassist" , "basser" , "app/cells/prefixes_test/singer" ] }
60
60
# it { DrummerCell.new(@controller)._prefixes.must_equal ["drummer", "stringer", "prefixes_test/singer"] }
61
61
62
62
# multiple view_paths.
63
- it { EngineCell . prefixes . must_equal [ "app/cells/engine" , "/var/engine/app/cells/engine" ] }
63
+ it { _ ( EngineCell . prefixes ) . must_equal [ "app/cells/engine" , "/var/engine/app/cells/engine" ] }
64
64
it do
65
- InheritingFromEngineCell . prefixes . must_equal [
65
+ _ ( InheritingFromEngineCell . prefixes ) . must_equal [
66
66
"app/cells/inheriting_from_engine" , "/var/engine/app/cells/inheriting_from_engine" ,
67
67
"app/cells/engine" , "/var/engine/app/cells/engine" ]
68
68
end
69
69
70
70
# ::_prefixes is cached.
71
71
it do
72
- WannabeCell . prefixes . must_equal [ "test/fixtures/wannabe" , "test/fixtures/bassist_cell/ibanez" , "test/fixtures/bassist" ]
72
+ _ ( WannabeCell . prefixes ) . must_equal [ "test/fixtures/wannabe" , "test/fixtures/bassist_cell/ibanez" , "test/fixtures/bassist" ]
73
73
WannabeCell . instance_eval { def _local_prefixes ; [ "more" ] end }
74
74
# _prefixes is cached.
75
- WannabeCell . prefixes . must_equal [ "test/fixtures/wannabe" , "test/fixtures/bassist_cell/ibanez" , "test/fixtures/bassist" ]
75
+ _ ( WannabeCell . prefixes ) . must_equal [ "test/fixtures/wannabe" , "test/fixtures/bassist_cell/ibanez" , "test/fixtures/bassist" ]
76
76
# superclasses don't get disturbed.
77
- ::BassistCell . prefixes . must_equal [ "test/fixtures/bassist" ]
77
+ _ ( ::BassistCell . prefixes ) . must_equal [ "test/fixtures/bassist" ]
78
78
end
79
79
end
80
80
@@ -96,12 +96,12 @@ def play
96
96
class FunkerCell < SlapperCell
97
97
end
98
98
99
- it { SlapperCell . new ( nil ) . _prefixes . must_equal [ "test/fixtures/inherit_views_test/slapper" , "test/fixtures/bassist" ] }
100
- it { FunkerCell . new ( nil ) . _prefixes . must_equal [ "test/fixtures/inherit_views_test/funker" , "test/fixtures/inherit_views_test/slapper" , "test/fixtures/bassist" ] }
99
+ it { _ ( SlapperCell . new ( nil ) . _prefixes ) . must_equal [ "test/fixtures/inherit_views_test/slapper" , "test/fixtures/bassist" ] }
100
+ it { _ ( FunkerCell . new ( nil ) . _prefixes ) . must_equal [ "test/fixtures/inherit_views_test/funker" , "test/fixtures/inherit_views_test/slapper" , "test/fixtures/bassist" ] }
101
101
102
102
# test if normal cells inherit views.
103
- it { cell ( 'inherit_views_test/slapper' ) . play . must_equal 'Doo' }
104
- it { cell ( 'inherit_views_test/funker' ) . play . must_equal 'Doo' }
103
+ it { _ ( cell ( 'inherit_views_test/slapper' ) . play ) . must_equal 'Doo' }
104
+ it { _ ( cell ( 'inherit_views_test/funker' ) . play ) . must_equal 'Doo' }
105
105
106
106
107
107
# TapperCell
@@ -122,12 +122,12 @@ class PopperCell < TapperCell
122
122
end
123
123
124
124
# Tapper renders its play
125
- it { cell ( 'inherit_views_test/tapper' ) . call ( :play ) . must_equal 'Dooom!' }
125
+ it { _ ( cell ( 'inherit_views_test/tapper' ) . call ( :play ) ) . must_equal 'Dooom!' }
126
126
# Tapper renders its tap
127
- it { cell ( 'inherit_views_test/tapper' ) . call ( :tap ) . must_equal 'Tap tap tap!' }
127
+ it { _ ( cell ( 'inherit_views_test/tapper' ) . call ( :tap ) ) . must_equal 'Tap tap tap!' }
128
128
129
129
# Popper renders Tapper's play
130
- it { cell ( 'inherit_views_test/popper' ) . call ( :play ) . must_equal 'Dooom!' }
130
+ it { _ ( cell ( 'inherit_views_test/popper' ) . call ( :play ) ) . must_equal 'Dooom!' }
131
131
# Popper renders its tap
132
- it { cell ( 'inherit_views_test/popper' ) . call ( :tap ) . must_equal "TTttttap I'm not good enough!" }
132
+ it { _ ( cell ( 'inherit_views_test/popper' ) . call ( :tap ) ) . must_equal "TTttttap I'm not good enough!" }
133
133
end
0 commit comments