p8-metric_fu 0.8.4.5 → 0.8.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/metric_fu/base.rb +2 -2
- data/spec/base_spec.rb +6 -0
- metadata +1 -1
data/lib/metric_fu/base.rb
CHANGED
@@ -11,13 +11,13 @@ module MetricFu
|
|
11
11
|
CODE_DIRS = ['lib']
|
12
12
|
end
|
13
13
|
|
14
|
-
def open_in_browser?
|
14
|
+
def self.open_in_browser?
|
15
15
|
if defined?(MetricFu::OPEN_IN_BROWSER)
|
16
16
|
PLATFORM['darwin'] && MetricFu::OPEN_IN_BROWSER
|
17
17
|
else
|
18
18
|
PLATFORM['darwin']
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
21
21
|
|
22
22
|
module Base
|
23
23
|
|
data/spec/base_spec.rb
CHANGED
@@ -46,5 +46,11 @@ describe MetricFu::Base::Generator do
|
|
46
46
|
@generator = MetricFu::Base::Generator.new('other_dir')
|
47
47
|
@generator.template_name.should == 'generator'
|
48
48
|
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "open_in_browser?" do
|
52
|
+
it "should return the value of PLATFORM['darwin']" do
|
53
|
+
@generator = MetricFu.open_in_browser?.should == PLATFORM['darwin']
|
54
|
+
end
|
49
55
|
end
|
50
56
|
end
|