Sha256: 35c282287bc2cdcc9460bbe120da14461cbeef51ed0b17b0fadd3a59c0b5164c
Contents?: true
Size: 1.24 KB
Versions: 7
Compression:
Stored size: 1.24 KB
Contents
RSpec.shared_context "with #should enabled", :uses_should do orig_syntax = nil before(:all) do orig_syntax = RSpec::Matchers.configuration.syntax RSpec::Matchers.configuration.syntax = [:expect, :should] end after(:context) do RSpec::Matchers.configuration.syntax = orig_syntax end end RSpec.shared_context "with the default expectation syntax" do orig_syntax = nil before(:context) do orig_syntax = RSpec::Matchers.configuration.syntax RSpec::Matchers.configuration.reset_syntaxes_to_default end after(:context) do RSpec::Matchers.configuration.syntax = orig_syntax end end RSpec.shared_context "with #should exclusively enabled", :uses_only_should do orig_syntax = nil before(:context) do orig_syntax = RSpec::Matchers.configuration.syntax RSpec::Matchers.configuration.syntax = :should end after(:context) do RSpec::Matchers.configuration.syntax = orig_syntax end end RSpec.shared_context "isolate include_chain_clauses_in_custom_matcher_descriptions" do around do |ex| orig = RSpec::Expectations.configuration.include_chain_clauses_in_custom_matcher_descriptions? ex.run RSpec::Expectations.configuration.include_chain_clauses_in_custom_matcher_descriptions = orig end end
Version data entries
7 entries across 7 versions & 2 rubygems