Module: AllureRSpec::DSL
- Included in:
- AllureRSpec
- Defined in:
- lib/allure-rspec/dsl.rb
Instance Method Summary collapse
Instance Method Details
#attach_file(title, file, opts = {}) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/allure-rspec/dsl.rb', line 21 def attach_file(title, file, opts = {}) suite = self.example.[:example_group][:description_args].first test = self.example.[:description] step = current_step AllureRubyAdaptorApi::Builder. suite, test, opts.merge(:file => file, :title => title, :step => step) end |
#current_step ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/allure-rspec/dsl.rb', line 5 def current_step if defined? @@__current_step @@__current_step else nil end end |
#step(step, &block) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/allure-rspec/dsl.rb', line 13 def step(step, &block) suite = self.example.[:example_group][:description_args].first test = self.example.[:description] AllureRubyAdaptorApi::Builder.start_step(suite, test, step) __with_step step, &block AllureRubyAdaptorApi::Builder.stop_step(suite, test, step) end |