appsignal 1.4.0.alpha.2 → 1.4.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +3 -1
- data/.travis.yml +3 -1
- data/CHANGELOG.md +38 -1
- data/Rakefile +29 -12
- data/benchmark.rake +3 -7
- data/ext/agent.yml +11 -11
- data/ext/appsignal_extension.c +364 -72
- data/ext/extconf.rb +2 -4
- data/gemfiles/resque.gemfile +1 -0
- data/lib/appsignal.rb +40 -30
- data/lib/appsignal/auth_check.rb +1 -1
- data/lib/appsignal/cli/diagnose.rb +4 -3
- data/lib/appsignal/cli/install.rb +16 -15
- data/lib/appsignal/config.rb +31 -31
- data/lib/appsignal/event_formatter.rb +1 -1
- data/lib/appsignal/extension.rb +6 -0
- data/lib/appsignal/garbage_collection_profiler.rb +47 -0
- data/lib/appsignal/hooks.rb +1 -0
- data/lib/appsignal/hooks/active_support_notifications.rb +43 -0
- data/lib/appsignal/integrations/capistrano/appsignal.cap +1 -1
- data/lib/appsignal/integrations/capistrano/capistrano_2_tasks.rb +2 -2
- data/lib/appsignal/integrations/mongo_ruby_driver.rb +1 -1
- data/lib/appsignal/integrations/object.rb +4 -4
- data/lib/appsignal/integrations/padrino.rb +1 -1
- data/lib/appsignal/integrations/sinatra.rb +1 -1
- data/lib/appsignal/integrations/webmachine.rb +2 -2
- data/lib/appsignal/js_exception_transaction.rb +7 -10
- data/lib/appsignal/marker.rb +3 -2
- data/lib/appsignal/rack/generic_instrumentation.rb +1 -1
- data/lib/appsignal/rack/sinatra_instrumentation.rb +13 -6
- data/lib/appsignal/rack/streaming_listener.rb +5 -3
- data/lib/appsignal/system.rb +36 -0
- data/lib/appsignal/transaction.rb +20 -20
- data/lib/appsignal/transmitter.rb +11 -7
- data/lib/appsignal/utils.rb +76 -2
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/auth_check_spec.rb +0 -2
- data/spec/lib/appsignal/capistrano2_spec.rb +99 -79
- data/spec/lib/appsignal/capistrano3_spec.rb +57 -78
- data/spec/lib/appsignal/cli/diagnose_spec.rb +17 -15
- data/spec/lib/appsignal/cli/install_spec.rb +38 -20
- data/spec/lib/appsignal/cli/notify_of_deploy_spec.rb +2 -5
- data/spec/lib/appsignal/cli_spec.rb +2 -5
- data/spec/lib/appsignal/config_spec.rb +385 -158
- data/spec/lib/appsignal/event_formatter/action_view/render_formatter_spec.rb +1 -3
- data/spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb +0 -2
- data/spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb +0 -2
- data/spec/lib/appsignal/event_formatter/elastic_search/search_formatter_spec.rb +0 -2
- data/spec/lib/appsignal/event_formatter/faraday/request_formatter_spec.rb +0 -2
- data/spec/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter_spec.rb +0 -2
- data/spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb +0 -2
- data/spec/lib/appsignal/event_formatter_spec.rb +0 -2
- data/spec/lib/appsignal/extension_spec.rb +7 -8
- data/spec/lib/appsignal/garbage_collection_profiler_spec.rb +71 -0
- data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +42 -0
- data/spec/lib/appsignal/hooks/celluloid_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/data_mapper_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/delayed_job_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/net_http_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/passenger_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/puma_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/rake_spec.rb +1 -2
- data/spec/lib/appsignal/hooks/redis_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/sequel_spec.rb +19 -21
- data/spec/lib/appsignal/hooks/shoryuken_spec.rb +1 -4
- data/spec/lib/appsignal/hooks/sidekiq_spec.rb +2 -3
- data/spec/lib/appsignal/hooks/unicorn_spec.rb +0 -2
- data/spec/lib/appsignal/hooks/webmachine_spec.rb +4 -11
- data/spec/lib/appsignal/hooks_spec.rb +0 -2
- data/spec/lib/appsignal/integrations/data_mapper_spec.rb +0 -1
- data/spec/lib/appsignal/integrations/grape_spec.rb +1 -3
- data/spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb +1 -2
- data/spec/lib/appsignal/integrations/object_spec.rb +32 -3
- data/spec/lib/appsignal/integrations/padrino_spec.rb +4 -11
- data/spec/lib/appsignal/integrations/railtie_spec.rb +1 -3
- data/spec/lib/appsignal/integrations/resque_active_job_spec.rb +1 -3
- data/spec/lib/appsignal/integrations/resque_spec.rb +2 -4
- data/spec/lib/appsignal/integrations/sinatra_spec.rb +33 -8
- data/spec/lib/appsignal/integrations/webmachine_spec.rb +6 -15
- data/spec/lib/appsignal/js_exception_transaction_spec.rb +3 -5
- data/spec/lib/appsignal/marker_spec.rb +35 -48
- data/spec/lib/appsignal/minutely_spec.rb +0 -2
- data/spec/lib/appsignal/rack/generic_instrumentation_spec.rb +0 -2
- data/spec/lib/appsignal/rack/js_exception_catcher_spec.rb +0 -2
- data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +3 -5
- data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +47 -11
- data/spec/lib/appsignal/rack/streaming_listener_spec.rb +6 -7
- data/spec/lib/appsignal/system/container_spec.rb +67 -0
- data/spec/lib/appsignal/system_spec.rb +49 -0
- data/spec/lib/appsignal/transaction_spec.rb +30 -13
- data/spec/lib/appsignal/transmitter_spec.rb +53 -20
- data/spec/lib/appsignal/utils/gzip_spec.rb +10 -0
- data/spec/lib/appsignal/utils/params_sanitizer_spec.rb +0 -2
- data/spec/lib/appsignal/utils/query_params_sanitizer_spec.rb +0 -2
- data/spec/lib/appsignal/utils_spec.rb +59 -3
- data/spec/lib/appsignal_spec.rb +132 -58
- data/spec/spec_helper.rb +24 -116
- data/spec/support/fixtures/containers/cgroups/docker +14 -0
- data/spec/support/fixtures/containers/cgroups/docker_systemd +8 -0
- data/spec/support/fixtures/containers/cgroups/lxc +10 -0
- data/spec/support/fixtures/containers/cgroups/no_permission +0 -0
- data/spec/support/fixtures/containers/cgroups/none +1 -0
- data/spec/support/helpers/api_request_helper.rb +22 -0
- data/spec/support/helpers/dependency_helper.rb +61 -0
- data/spec/support/helpers/directory_helper.rb +27 -0
- data/spec/support/helpers/std_streams_helper.rb +35 -0
- data/spec/support/helpers/system_helpers.rb +24 -0
- data/spec/support/helpers/transaction_helpers.rb +7 -64
- data/spec/support/helpers/very_specific_error.rb +8 -0
- data/spec/support/mocks/fake_gc_profiler.rb +19 -0
- data/spec/support/project_fixture/config/appsignal.yml +10 -1
- metadata +60 -35
- data/circle.yml +0 -12
- data/lib/appsignal/subscriber.rb +0 -55
- data/lib/appsignal/update_active_support.rb +0 -20
- data/lib/vendor/active_support/notifications.rb +0 -212
- data/lib/vendor/active_support/notifications/fanout.rb +0 -157
- data/lib/vendor/active_support/notifications/instrumenter.rb +0 -73
- data/lib/vendor/active_support/per_thread_registry.rb +0 -53
- data/spec/lib/appsignal/subscriber_spec.rb +0 -160
- data/spec/lib/appsignal/update_active_support_spec.rb +0 -17
- data/spec/support/helpers/notification_helpers.rb +0 -14
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
1
|
require 'fileutils'
|
3
2
|
|
4
3
|
describe "extension loading and operation" do
|
@@ -38,26 +37,26 @@ describe "extension loading and operation" do
|
|
38
37
|
end
|
39
38
|
|
40
39
|
context "with a transaction" do
|
41
|
-
subject { Appsignal::Extension.start_transaction('request_id', 'http_request') }
|
40
|
+
subject { Appsignal::Extension.start_transaction('request_id', 'http_request', 0) }
|
42
41
|
|
43
42
|
it "should have a start_event method" do
|
44
|
-
subject.start_event
|
43
|
+
subject.start_event(0)
|
45
44
|
end
|
46
45
|
|
47
46
|
it "should have a finish_event method" do
|
48
|
-
subject.finish_event('name', 'title', 'body', 0)
|
47
|
+
subject.finish_event('name', 'title', 'body', 0, 0)
|
49
48
|
end
|
50
49
|
|
51
50
|
it "should have a record_event method" do
|
52
|
-
subject.record_event('name', 'title', 'body', 0, 1000)
|
51
|
+
subject.record_event('name', 'title', 'body', 1000, 0, 1000)
|
53
52
|
end
|
54
53
|
|
55
54
|
it "should have a set_error method" do
|
56
|
-
subject.set_error('name', 'message',
|
55
|
+
subject.set_error('name', 'message', Appsignal::Extension.data_map_new)
|
57
56
|
end
|
58
57
|
|
59
58
|
it "should have a set_sample_data method" do
|
60
|
-
subject.set_sample_data('params',
|
59
|
+
subject.set_sample_data('params', Appsignal::Extension.data_map_new)
|
61
60
|
end
|
62
61
|
|
63
62
|
it "should have a set_action method" do
|
@@ -73,7 +72,7 @@ describe "extension loading and operation" do
|
|
73
72
|
end
|
74
73
|
|
75
74
|
it "should have a finish method" do
|
76
|
-
subject.finish
|
75
|
+
subject.finish(0)
|
77
76
|
end
|
78
77
|
|
79
78
|
it "should have a complete method" do
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require_relative '../../support/mocks/fake_gc_profiler'
|
3
|
+
|
4
|
+
describe Appsignal::GarbageCollectionProfiler do
|
5
|
+
let(:internal_profiler) { FakeGCProfiler.new }
|
6
|
+
|
7
|
+
before do
|
8
|
+
allow_any_instance_of(Appsignal::GarbageCollectionProfiler)
|
9
|
+
.to receive(:internal_profiler)
|
10
|
+
.and_return(internal_profiler)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should have a total time of 0" do
|
14
|
+
expect(Appsignal::GarbageCollectionProfiler.new.total_time).to eq(0)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "after a GC run" do
|
18
|
+
before do
|
19
|
+
internal_profiler.total_time = 0.12345
|
20
|
+
@profiler = Appsignal::GarbageCollectionProfiler.new
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should take the total time from Ruby's GC::Profiler" do
|
24
|
+
expect(@profiler.total_time).to eq(123)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should clear Ruby's GC::Profiler" do
|
28
|
+
expect(internal_profiler).to receive(:clear)
|
29
|
+
@profiler.total_time
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "when the total GC time becomes too high" do
|
34
|
+
it "should reset" do
|
35
|
+
profiler = Appsignal::GarbageCollectionProfiler.new
|
36
|
+
internal_profiler.total_time = 2_147_483_647
|
37
|
+
expect(profiler.total_time).to eq(0)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "after multiple GC runs" do
|
42
|
+
it "should add all times from Ruby's GC::Profiler together" do
|
43
|
+
profiler = Appsignal::GarbageCollectionProfiler.new
|
44
|
+
|
45
|
+
2.times do
|
46
|
+
internal_profiler.total_time = 0.12345
|
47
|
+
profiler.total_time
|
48
|
+
end
|
49
|
+
|
50
|
+
expect(profiler.total_time).to eq(246)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "in multiple threads, with a slow GC::Profiler" do
|
55
|
+
it "should not count garbage collection times twice" do
|
56
|
+
threads, results = [], []
|
57
|
+
internal_profiler.clear_delay = 0.001
|
58
|
+
internal_profiler.total_time = 0.12345
|
59
|
+
|
60
|
+
2.times do
|
61
|
+
threads << Thread.new do
|
62
|
+
profiler = Appsignal::GarbageCollectionProfiler.new
|
63
|
+
results << profiler.total_time
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
threads.each(&:join)
|
68
|
+
expect(results).to eq([123, 0])
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
describe Appsignal::Hooks::ActiveSupportNotificationsHook do
|
2
|
+
if active_support_present?
|
3
|
+
before :all do
|
4
|
+
start_agent
|
5
|
+
end
|
6
|
+
before do
|
7
|
+
Appsignal::Transaction.create('uuid', Appsignal::Transaction::HTTP_REQUEST, 'test')
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:notifier) { ActiveSupport::Notifications::Fanout.new }
|
11
|
+
let(:instrumenter) { ActiveSupport::Notifications::Instrumenter.new(notifier) }
|
12
|
+
|
13
|
+
its(:dependencies_present?) { should be_true }
|
14
|
+
|
15
|
+
it "should instrument an AS notifications instrument call with a block" do
|
16
|
+
expect( Appsignal::Transaction.current ).to receive(:start_event)
|
17
|
+
.at_least(:once)
|
18
|
+
expect( Appsignal::Transaction.current ).to receive(:finish_event)
|
19
|
+
.at_least(:once)
|
20
|
+
.with("sql.active_record", nil, 'SQL', 1)
|
21
|
+
|
22
|
+
return_value = instrumenter.instrument('sql.active_record', :sql => 'SQL') do
|
23
|
+
'value'
|
24
|
+
end
|
25
|
+
|
26
|
+
expect(return_value).to eq 'value'
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should not instrument events whose name starts with a bang" do
|
30
|
+
expect( Appsignal::Transaction.current ).not_to receive(:start_event)
|
31
|
+
expect( Appsignal::Transaction.current ).not_to receive(:finish_event)
|
32
|
+
|
33
|
+
return_value = instrumenter.instrument('!sql.active_record', :sql => 'SQL') do
|
34
|
+
'value'
|
35
|
+
end
|
36
|
+
|
37
|
+
expect(return_value).to eq 'value'
|
38
|
+
end
|
39
|
+
else
|
40
|
+
its(:dependencies_present?) { should be_false }
|
41
|
+
end
|
42
|
+
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
1
|
require 'rake'
|
3
2
|
|
4
3
|
describe Appsignal::Hooks::RakeHook do
|
@@ -16,7 +15,7 @@ describe Appsignal::Hooks::RakeHook do
|
|
16
15
|
|
17
16
|
describe "#execute" do
|
18
17
|
context "with transaction" do
|
19
|
-
let!(:transaction) {
|
18
|
+
let!(:transaction) { background_job_transaction }
|
20
19
|
let!(:agent) { double('Agent', :send_queue => true) }
|
21
20
|
before do
|
22
21
|
transaction.stub(:set_action)
|
@@ -1,28 +1,26 @@
|
|
1
|
-
|
1
|
+
describe Appsignal::Hooks::SequelHook do
|
2
|
+
if DependencyHelper.sequel_present?
|
3
|
+
let(:db) { Sequel.sqlite }
|
2
4
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
before :all do
|
7
|
-
start_agent
|
8
|
-
end
|
5
|
+
before :all do
|
6
|
+
start_agent
|
7
|
+
end
|
9
8
|
|
10
|
-
|
9
|
+
its(:dependencies_present?) { should be_true }
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
context "with a transaction" do
|
12
|
+
it "should instrument queries" do
|
13
|
+
Appsignal::Transaction.create('uuid', Appsignal::Transaction::HTTP_REQUEST, 'test')
|
14
|
+
expect( Appsignal::Transaction.current ).to receive(:start_event)
|
15
|
+
.at_least(:once)
|
16
|
+
expect( Appsignal::Transaction.current ).to receive(:finish_event)
|
17
|
+
.at_least(:once)
|
18
|
+
.with("sql.sequel", nil, kind_of(String), 1)
|
20
19
|
|
21
|
-
|
20
|
+
db['SELECT 1'].all.to_a
|
21
|
+
end
|
22
22
|
end
|
23
|
+
else
|
24
|
+
its(:dependencies_present?) { should be_false }
|
23
25
|
end
|
24
26
|
end
|
25
|
-
|
26
|
-
describe Appsignal::Hooks::SequelHook, unless: sequel_present? do
|
27
|
-
its(:dependencies_present?) { should be_false }
|
28
|
-
end
|
@@ -1,6 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
|
4
1
|
describe Appsignal::Hooks::ShoryukenMiddleware do
|
5
2
|
let(:current_transaction) { background_job_transaction }
|
6
3
|
|
@@ -51,7 +48,7 @@ describe Appsignal::Hooks::ShoryukenMiddleware do
|
|
51
48
|
end
|
52
49
|
|
53
50
|
context "with an erroring call" do
|
54
|
-
let(:error) { VerySpecificError.new
|
51
|
+
let(:error) { VerySpecificError.new }
|
55
52
|
|
56
53
|
it "should add the exception to appsignal" do
|
57
54
|
Appsignal::Transaction.any_instance.should_receive(:set_error).with(error)
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
1
|
describe Appsignal::Hooks::SidekiqPlugin do
|
4
2
|
let(:worker) { double }
|
5
3
|
let(:queue) { double }
|
@@ -79,7 +77,8 @@ describe Appsignal::Hooks::SidekiqPlugin do
|
|
79
77
|
end
|
80
78
|
|
81
79
|
context "with an erroring call" do
|
82
|
-
let(:error) { VerySpecificError.new
|
80
|
+
let(:error) { VerySpecificError.new }
|
81
|
+
|
83
82
|
it "should add the exception to appsignal" do
|
84
83
|
Appsignal::Transaction.any_instance.should_receive(:set_error).with(error)
|
85
84
|
end
|
@@ -1,17 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
if webmachine_present?
|
4
|
-
|
5
|
-
describe Appsignal::Hooks::WebmachineHook do
|
1
|
+
describe Appsignal::Hooks::WebmachineHook do
|
2
|
+
if DependencyHelper.webmachine_present?
|
6
3
|
context "with webmachine" do
|
7
|
-
|
8
|
-
|
9
|
-
end
|
4
|
+
let(:fsm) { Webmachine::Decision::FSM.new(double(:trace? => false), double, double) }
|
5
|
+
before(:all) { start_agent }
|
10
6
|
|
11
7
|
its(:dependencies_present?) { should be_true }
|
12
8
|
|
13
|
-
let(:fsm) { Webmachine::Decision::FSM.new(double(:trace? => false), double, double) }
|
14
|
-
|
15
9
|
it "should include the run alias methods" do
|
16
10
|
expect( fsm ).to respond_to(:run_with_appsignal)
|
17
11
|
expect( fsm ).to respond_to(:run_without_appsignal)
|
@@ -28,5 +22,4 @@ if webmachine_present?
|
|
28
22
|
end
|
29
23
|
end
|
30
24
|
end
|
31
|
-
|
32
25
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
1
|
require 'appsignal/integrations/mongo_ruby_driver'
|
3
2
|
describe Appsignal::Hooks::MongoMonitorSubscriber do
|
4
3
|
let(:subscriber) { Appsignal::Hooks::MongoMonitorSubscriber.new }
|
@@ -82,7 +81,7 @@ describe Appsignal::Hooks::MongoMonitorSubscriber do
|
|
82
81
|
transaction.should receive(:finish_event).with(
|
83
82
|
'query.mongodb',
|
84
83
|
'find | test | SUCCEEDED',
|
85
|
-
|
84
|
+
Appsignal::Utils.data_generate({'foo' => '?'}),
|
86
85
|
0
|
87
86
|
)
|
88
87
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
1
|
require 'appsignal/integrations/object'
|
3
2
|
|
4
3
|
describe Object do
|
@@ -15,7 +14,7 @@ describe Object do
|
|
15
14
|
let(:instance) { klass.new }
|
16
15
|
|
17
16
|
context "when active" do
|
18
|
-
let(:transaction) {
|
17
|
+
let(:transaction) { http_request_transaction }
|
19
18
|
before { Appsignal.config = project_fixture_config }
|
20
19
|
after { Appsignal.config = nil }
|
21
20
|
|
@@ -93,6 +92,21 @@ describe Object do
|
|
93
92
|
expect(instance.foo).to eq(1)
|
94
93
|
end
|
95
94
|
end
|
95
|
+
|
96
|
+
context "with a method given a block" do
|
97
|
+
let(:klass) do
|
98
|
+
Class.new do
|
99
|
+
def foo
|
100
|
+
yield
|
101
|
+
end
|
102
|
+
appsignal_instrument_method :foo
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should yield the block" do
|
107
|
+
expect(instance.foo { 42 }).to eq(42)
|
108
|
+
end
|
109
|
+
end
|
96
110
|
end
|
97
111
|
|
98
112
|
context "when not active" do
|
@@ -117,7 +131,7 @@ describe Object do
|
|
117
131
|
end
|
118
132
|
|
119
133
|
context "when active" do
|
120
|
-
let(:transaction) {
|
134
|
+
let(:transaction) { http_request_transaction }
|
121
135
|
before { Appsignal.config = project_fixture_config }
|
122
136
|
after { Appsignal.config = nil }
|
123
137
|
|
@@ -195,6 +209,21 @@ describe Object do
|
|
195
209
|
expect(klass.bar).to eq(2)
|
196
210
|
end
|
197
211
|
end
|
212
|
+
|
213
|
+
context "with a method given a block" do
|
214
|
+
let(:klass) do
|
215
|
+
Class.new do
|
216
|
+
def self.bar
|
217
|
+
yield
|
218
|
+
end
|
219
|
+
appsignal_instrument_class_method :bar
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
it "should yield the block" do
|
224
|
+
expect(klass.bar { 42 }).to eq(42)
|
225
|
+
end
|
226
|
+
end
|
198
227
|
end
|
199
228
|
|
200
229
|
context "when not active" do
|