Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
== NORMAL 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 RUBY_NAME matched - yields when RUBY_NAME not matched Object#extended_on - does not yield when RUBY_NAME matched - yields when does RUBY_NAME not matched Object#compliant_on - does not yield when RUBY_NAME not matched - yields when RUBY_NAME matched Object#not_compliant_on - does not yield when RUBY_NAME matched - yields when RUBY_NAME not matched Object#deviates_on - does not yield when RUBY_NAME not matched - yields when RUBY_NAME matched 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.097354 seconds 102 examples, 0 failures == VERBOSE_GUARDS MSpec.version? with guard failure reporting - returns :match if host version matches and host version == TARGET_VERSION - returns :mismatch if both match but host version != TARGET_VERSION - returns :target_only if TARGET_VERSION matches but host version does not - returns :host_only if host version matches but TARGET_VERSION does not - returns :neither if neither host version nor TARGET_VERSION match MSpec.patch? with guard failure reporting - returns :match if host patchlevel matches and == TARGET_PATCHLEVEL - returns :mismatch if both match but host patchlevel != TARGET_PATCHLEVEL - returns :target_only if TARGET_PATCHLEVEL matches but host patchlevel does not - returns :host_only if host patchlevel matches but TARGET_PATCHLEVEL not - returns :neither if neither host patchlevel nor TARGET_PATCHLEVEL match MSpec.date? with guard failure reporting - returns :match if host date matches and == TARGET_RELEASE_DATE - returns :mismatch if both match but host date != TARGET_RELEASE_DATE - returns :target_only if TARGET_RELEASE_DATE matches but host date does not - returns :host_only if host date matches but TARGET_RELEASE_DATE not - returns :neither if neither host date nor TARGET_RELEASE_DATE match #compliant_on with guard failures - if target is not matched, specs converted to SpecTargetFailures - if target matches but host engine does not, specs converted to ComplianceFailures - if both target and host engine match, runs normally #not_compliant_on with guard failures - if target is matched, specs converted to SpecTargetFailures - if only engine matches, specs converted to ComplianceFailures - if neither engine nor target match, runs normally #quarantine! with guard failures - always converts specs to GuardFailureErrors #fails_on with guard failures - if target matches, converts specs to SpecTargetFailures - if only engine matches, converts specs to ComplianceFailures - if neither engine nor target match, runs normally #deviates_on with guard failures - if target matches, converts specs to SpecTargetFailures - if only engine matches, converts specs to ComplianceFailures - if neither engine nor target matches, skips the block #extended_on with guard failures - if engine matches, runs normally - if engine not matched, skips this block #platform_is with guard failures - if platform matches, runs normally - if platform not matched, skips this block #platform_is :os with guard failures - if host OS matches, runs normally - if host OS not matched, skips this block #platform_is :wordsize (32/64 bit) with guard failures - if host wordsize matches, runs normally - if host wordsize not matched, skips this block #platform_is :version with guard failures - if neither target nor host matches, converts specs to ComplianceFailures - if host matches but target does not, converts specs to ComplianceFailures - if target matches but host does not, converts specs to ComplianceFailures - if both match but host != target, converts specs to PlatformMismatchFailures - if both match and host == target, runs normally #platform_is :patch with guard failures - if neither target nor host matches, converts specs to ComplianceFailures - if host matches but target does not, converts specs to ComplianceFailures - if target matches but host does not, converts specs to ComplianceFailures - if both match but host != target, converts specs to PlatformMismatchFailures - if both match and host == target, runs normally #platform_is :date with guard failures - if neither host nor target matches, converts specs to ComplianceFailures - if host matches and target does not, converts specs to ComplianceFailures - if target matches and host does not, converts specs to ComplianceFailures - if both match but host != target, converts specs to PlatformMismatchFailures - if both match and host == target, runs normally #platform_is_not with guard failures - if platform not matched, runs normally - if platform does match, skips this block #platform_is_not :os with guard failures - if host OS does not match, runs normally - if host OS matched, skips this block #platform_is_not :wordsize (32/64 bit) with guard failures - if host wordsize does not match, runs normally - if host wordsize matched, skips this block #platform_is_not :version with guard failures - if host matches and target does not, converts specs to ComplianceFailures - if target matches and host does not, converts specs to ComplianceFailures - if both match but host != target, converts specs to PlatformMismatchFailures - if both match and host == target, converts specs to ComplianceFailures - if neither host nor target matches, runs normally #platform_is_not :patch with guard failures - if host matches and target does not, converts specs to ComplianceFailures - if target matches and host does not, converts specs to ComplianceFailures - if both match but host != target, converts specs to PlatformMismatchFailures - if both match and host == target, converts specs to ComplianceFailures - if neither host nor target matches, runs normally #platform_is_not :date with guard failures - if host matches and target does not, converts specs to ComplianceFailures - if target matches and host does not, converts specs to ComplianceFailures - if both match but host != target, converts specs to PlatformMismatchFailures - if both match and host == target, converts specs to ComplianceFailures - if neither host nor target match, runs normally Finished in 0.083478 seconds 72 examples, 0 failures
This paste will be private.
From the Design Piracy series on my blog: