File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,11 @@ def rspec(*rspec_args)
2323 start_sink ( jobs : jobs , workers : workers , formatter : formatter )
2424 end
2525
26+ private
27+
2628 def formatter
2729 @formatter ||= begin
28- formatter_klass = " Flatware::RSpec::Formatters:: #{ options [ :formatter ] . capitalize } " . constantize
30+ formatter_klass = Flatware ::RSpec ::Formatters . const_get ( options [ :formatter ] . capitalize )
2931
3032 formatter_klass . new (
3133 ::RSpec . configuration . output_stream ,
Original file line number Diff line number Diff line change 55 context 'when example_passed' do
66 it "sends a 'passed' progress message to the sink client" do
77 formatter = described_class . new StringIO . new
8- example = double 'Example'
8+ example = double 'Example' , full_description : 'example description' ,
9+ location : 'here' ,
10+ location_rerun_argument : 'here[1]' ,
11+ metadata : { } ,
12+ execution_result : double (
13+ 'Execution result' ,
14+ status : :passed ,
15+ exception : nil ,
16+ finished_at : Time . now ,
17+ run_time : 0.1 ,
18+ started_at : Time . now - 0.1
19+ )
20+ notification = double 'Notification' , example : example
921 client = double 'Client' , progress : true
1022 Flatware ::Sink . client = client
11- formatter . example_passed example
23+ formatter . example_passed notification
1224
1325 expect ( client ) . to have_received ( :progress ) . with anything do |message |
14- expect ( message . progress ) . to eq :passed
26+ expect ( message . example . execution_result . status ) . to eq :passed
1527 true
1628 end
1729 end
You can’t perform that action at this time.
0 commit comments