== Normal mode
MSpec.engine?
- returns true if passed :ruby and RUBY_NAME == 'ruby'
- returns true if passed :rbx and RUBY_NAME == 'rbx'
- returns true if passed :rubinius and RUBY_NAME == 'rbx'
- returns true if passed :jruby and RUBY_NAME == 'jruby'
- returns false when passed an unrecognized name
MSpec.guard?
- accepts multiple arguments and passes them to the block
- returns true when the block evaluates to true
- returns false when the block evaluates to false
MSpec.runner?
- returns true when passed :mspec and ENV['MSPEC_RUNNER'] is true
- returns false when passed :mspec and ENV['MSPEC_RUNNER'] is false
- returns true when passed :rspec and ENV['RSPEC_RUNNER'] is false but the constant Spec exists
- returns true when passed :rspec and ENV['RSPEC_RUNNER'] is true but the constant Spec does not exist
MSpec.platform?
- returns false when arg does not match RUBY_PLATFORM
- returns false when no arg matches RUBY_PLATFORM
- returns true when arg matches RUBY_PLATFORM
- returns true when any arg matches RUBY_PLATFORM
MSpec.version?
- returns true if arg is numerically equivalent to version
- returns false if arg is numerically smaller or larger than version
- returns true if any of args is numerically equivalent to version
- accepts preceding equality operator and returns version == given
- accepts < preceding the version and returns version < given
- accepts > preceding the version and returns version > given
- accepts <= preceding the version and returns version <= given
- accepts >= preceding the version and returns version >= given
- accepts any combination of multiple comparisons and returns true if any is true
- accepts Ranges and returns true if version numerically falls in range
- returns false if version do not numerically fall in range
MSpec.patch?
- returns true if string is numerically equivalent to patchlevel
- returns true if integer is numerically equivalent to patchlevel
- returns false if string is numerically smaller/larger than patchlevel
- returns false if integer is numerically not equal to patchlevel
- returns true if any string is numerically equivalent to patchlevel
- returns true if any integer is numerically equivalent to patchlevel
- accepts mixed string and numeric arguments
- accepts equality operator preceding the string returning patchlevel == given
- accepts < preceding the string and returns patchlevel < given
- accepts > preceding the string and returns patchlevel > given
- accepts <= preceding the string and returns patchlevel <= given
- accepts >= preceding the string and returns patchlevel >= given
- accepts any combination of multiple comparisons and returns true if any match
- accepts string Ranges and returns true if patch falls in the range
- accepts integer Ranges and returns true for patch falls in the range
MSpec.date? (converting argument with Time.parse)
- returns true when arg matches both dates
- returns false when arg does not match dates
- returns true when any arg matches dates
- returns false when none of the args matches dates
- accepts preceding equality operator and returns target date == date
- accepts preceding < and returns target date < date
- accepts preceding > and returns target date > date
- accepts preceding <= and returns target date <= date
- accepts preceding >= and returns target date >= date
- returns true when arg is a Range and dates fall in the range
- returns false when arg is a Range and dates do not fall in the range
- ignores the operators if given a range with comparison operators
MSpec.wordsize?
- returns whether determined platform wordsize is 32 if given 32
- returns whether determined platform wordsize is 64 if given 64
MSpec.os?
- returns true if host OS can be matched to given
- returns false if host OS cannot be matched to given
Object#quarantine!
- never yields
Object#fails_on
- does not yield when matches RUBY_NAME
- yields when matches RUBY_NAME
Object#extended_on
- does not yield when matches RUBY_NAME
- yields when matches RUBY_NAME
Object#compliant_on
- does not yield when matches RUBY_NAME
- yields when matches RUBY_NAME
Object#not_compliant_on
- does not yield when matches RUBY_NAME
- yields when matches RUBY_NAME
Object#deviates_on
- does not yield when matches RUBY_NAME
- yields when matches RUBY_NAME
Object#platform_is
- does not yield when MSpec.platform? returns false
- yields when MSpec.platform? returns true
Object#platform_is_not
- does not yield when matches RUBY_PLATFORM
- yields when platform does not match RUBY_PLATFORM
Object#platform_is :version => VERSION_SPEC
- yields when matches RUBY_VERSION
- does not yield when does not match RUBY_VERSION
Object#platform_is_not :version => VERSION_SPEC
- does not yield when matches RUBY_VERSION
- yields when does not match RUBY_VERSION
Object#platform_is :patch => PATCHLEVEL_SPEC
- does not yield when does not match RUBY_PATCHLEVEL
- yields when matches RUBY_PATCHLEVEL
Object#platform_is_not :patch => PATCHLEVEL_SPEC
- does not yield when matches RUBY_PATCHLEVEL
- yields when does not match RUBY_PATCHLEVEL
Object#platform_is :date => DATE_SPEC
- does not yield when does not match RUBY_RELEASE_DATE
- yields when matches RUBY_RELEASE_DATE
Object#platform_is_not :date => DATE_SPEC
- does not yield when matches RUBY_RELEASE_DATE
- yields when matches RUBY_RELEASE_DATE
Object#platform_is :os => OS_SPEC
- yields when host OS matches
- does not yield when host OS does not match
Object#platform_is_not :os => OS_SPEC
- does not yield when the host OS matches
- yields when the host OS does not match
Object#platform_is :wordsize => SIZE_SPEC
- yields when matches the platform's wordsize (32 or 64)
- does not yield when the platform wordsize (32 or 64) is not matched
Object#platform_is_not :wordsize => SIZE_SPEC
- yields when the platform wordsize (32 or 64) is not matched
- does not yield when matches the platform's wordsize (32 or 64)
Object#runner_is
- yields when passed :mspec and ENV['MSPEC_RUNNER'] is true
- does not yield when passed :mspec and ENV['MSPEC_RUNNER'] is false
- yields when passed :rspec and ENV['RSPEC_RUNNER'] is true
- yields when passed :rspec and the constant Spec exists
- does not yield when passed :rspec and ENV['RSPEC_RUNNER'] is false and the constant Spec does not exist
Object#runner_is_not
- does not yield when passed :mspec and ENV['MSPEC_RUNNER'] is true
- yields when passed :mspec and ENV['MSPEC_RUNNER'] is false
- does not yield when passed :rspec and ENV['RSPEC_RUNNER'] is false but the constant Spec exists
- does not yield when passed :rspec and ENV['RSPEC_RUNNER'] is true but the constant Spec does not exist
Finished in 0.097809 seconds
102 examples, 0 failures
=== Guard failures reported
MSpec.version? with guard failure reporting
- returns :match if platform version matches and == TARGET_VERSION
- returns :mismatch if both match but platform version != TARGET_VERSION
- returns :target_only if TARGET_VERSION matches but platform version does not
- returns :platform_only if platform version matches but TARGET_VERSION does not
- returns :neither if neither platform version nor TARGET_VERSION match
MSpec.patch? with guard failure reporting
- returns :match if platform patchlevel matches and == TARGET_PATCHLEVEL
- returns :mismatch if both match but platform patchlevel != TARGET_PATCHLEVEL
- returns :target_only if TARGET_PATCHLEVEL matches but platform patchlevel does not
- returns :platform_only if platform patchlevel matches but TARGET_PATCHLEVEL not
- returns :neither if neither platform patchlevel nor TARGET_PATCHLEVEL match
MSpec.date? with guard failure reporting
- returns :match if platform date matches and == TARGET_RELEASE_DATE
- returns :mismatch if both match but platform date != TARGET_RELEASE_DATE
- returns :target_only if TARGET_RELEASE_DATE matches but platform date does not
- returns :platform_only if platform date matches but TARGET_RELEASE_DATE not
- returns :neither if neither platform date nor TARGET_RELEASE_DATE match
MSpec with guard failure reporting enabled
- fails every #it inside #compliant_on as a spec target failure if TARGET is not listed
- fails every #it inside #compliant_on as a compliance failure if TARGET listed but engine is not
- runs normally in #compliant_on if both engine and TARGET listed
- fails every #it in #not_compliant_on as spec target failure if TARGET matches
- fails every #it inside #not_compliant_on as compliance failure if engine listed
- runs normally in #not_compliant_on if neither engine nor TARGET listed
- always fails each #it inside #quarantine!
- fails every #it in #fails_on as spec target failure if TARGET listed
- fails every #it in #fails_on as compliance failure if engine listed
- runs normally in #fails_on if neither engine nor TARGET listed
- fails every #it block in #deviates_on as spec target failure if TARGET listed
- fails every #it block in #deviates_on as compliance failure if engine listed
- skips everything in #deviates_on if this platform is not listed
- runs normally in #extended_on if this platform listed
- skips everything in #extended_on if this platform not listed
- runs normally in plain #platform_is if this platform matches
- skips everything in plain #platform_is if this platform does not match
- runs normally in #platform_is :os if platform OS matches
- skips everything in #platform_is :os if platform OS does not match
- runs normally in #platform_is :wordsize if determined platform wordsize matches
- skips everything in #platform_is :wordsize if platform wordsize does not match
- fails every #it in #platform_is :version as compliance failure if neither platform version nor TARGET_VERSION is matched
- fails every #it in #platform_is :version as a compliance failure if platform version is matched but TARGET_VERSION is not
- fails every #it in #platform_is :version as a compliance failure if TARGET_VERSION is matched but platform version is not
- fails every #it in #platform_is :version as a platform mismatch failure if if both versions match but platform version != TARGET_VERSION
- runs normally in #platform_is :version if both platform and target are matched and they are equal
- fails every #it in #platform_is :patch as compliance failure if neither platform patchlevel nor TARGET_PATCHLEVEL is matched
- fails every #it in #platform_is :patch as a compliance failure if platform patchlevel is matched but TARGET_PATCHLEVEL is not
- fails every #it in #platform_is :patch as a compliance failure if TARGET_PATCHLEVEL is matched but platform patchlevel is not
- fails every #it in #platform_is :patch as platform mismatch failureif both match but platform patchlevel != TARGET_PATCHLEVEL
- runs normally in #platform_is :patch only if both platform and target are matched and they are equal
- fails every #it in #platform_is :date as compliance failure if neither platform date nor TARGET_RELEASE_DATE is matched
- fails every #it in #platform_is :date as a compliance failure if platform date is matched but TARGET_RELEASE_DATE is not
- fails every #it in #platform_is :date as a compliance failure if TARGET_RELEASE_DATE is matched but platform date is not
- fails every #it in #platform_is :date as platform mismatch failureif both match but platform date != TARGET_RELEASE_DATE
- runs normally in #platform_is :date only if both platform and target are matched and they are equal
- runs normally in #platform_is_not if platform does not match
- skips everything in plain #platform_is_not if platform matches
- runs normally in #platform_is_not :os if platform OS does not match
- skips everything in #platform_is_not :os if platform OS matches
- fails every #it in #platform_is_not :version as a compliance failure if platform version matches and TARGET_VERSION does not
- fails every #it in #platform_is_not :version as a compliance failure if TARGET_VERSION is matched but platform version is not
- fails every #it in #platform_is_not :version as platform mismatch failure if both platform version and TARGET_VERSION match but are not equal
- fails every #it in #platform_is_not :version as a spec target failure if both TARGET_VERSION and platform version match and are equal
- runs normally in #platform_is_not :version only if given matches neither TARGET_VERSION nor platform version
- fails every #it in #platform_is_not :patch as a compliance failure if platform patchlevel matches and TARGET_PATCHLEVEL does not
- fails every #it in #platform_is_not :patch as compliance failure if TARGET_PATCHLEVEL is matched but platform patchlevel is not
- fails every #it in #platform_is_not :patch as platform mismatch failure if both platform patchlevel and TARGET_PATCHLEVEL match but are not equal
- fails every #it in #platform_is_not :patch as compliance failure if both TARGET_PATCHLEVEL and platform patchlevel match and are equal
- runs normally in #platform_is_not :patch only if given matches neither TARGET_PATCHLEVEL nor platform patchlevel
- fails every #it in #platform_is_not :date as a compliance failure if platform date matches and TARGET_RELEASE_DATE does not
- fails every #it in #platform_is_not :date as a compliance failure if TARGET_RELEASE_DATE is matched but platform date is not
- fails every #it in #platform_is_not :date as platform mismatch failure if both platform date and TARGET_RELEASE_DATE match but are not equal
- fails every #it in #platform_is_not :date as compliance failure if both TARGET_RELEASE_DATE and platform date match and are equal
- runs normally in #platform_is_not :date only if given matches neither TARGET_RELEASE_DATE nor platform date
Finished in 0.071542 seconds
70 examples, 0 failures