rspec-block-is-expected-1.0.4/0000755000175000017500000000000014407646417014631 5ustar raviravirspec-block-is-expected-1.0.4/rubocop.yml0000644000175000017500000000007714407646417017031 0ustar raviraviRSpec: Language: Expectations: - block_is_expected rspec-block-is-expected-1.0.4/rspec-block_is_expected.gemspec0000644000175000017500000000401414407646417022755 0ustar raviravi# NOTE: Have to use __FILE__ until Ruby 1.x support is dropped lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'rspec/block_is_expected/version' Gem::Specification.new do |spec| spec.name = 'rspec-block_is_expected' spec.version = Rspec::BlockIsExpected::VERSION spec.authors = ['Peter Boling'] spec.email = ['peter.boling@gmail.com'] spec.summary = 'Simplify testing of blocks in RSpec via block_is_expected' spec.description = %[subject { Integer(nil) }; it('raises') { block_is_expected.to raise_error(TypeError) }] spec.homepage = 'https://github.com/pboling/rspec-block_is_expected' spec.license = 'MIT' spec.required_ruby_version = '>= 1.8.7' spec.metadata['homepage_uri'] = spec.homepage spec.metadata['source_code_uri'] = "#{spec.homepage}/tree/v#{spec.version}" spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md" spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues" spec.metadata['documentation_uri'] = "https://www.rubydoc.info/gems/#{spec.name}/#{spec.version}" spec.metadata['funding_uri'] = 'https://liberapay.com/pboling' spec.metadata['wiki_uri'] = "#{spec.homepage}/wiki" spec.metadata['rubygems_mfa_required'] = 'true' # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|\.lock)/}) } spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] spec.add_dependency 'rspec-core' spec.add_development_dependency 'appraisal' spec.add_development_dependency 'bundler' spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec', '~> 3.8' spec.add_development_dependency 'rspec-pending_for', '~> 0.1' spec.add_development_dependency 'wwtd' end rspec-block-is-expected-1.0.4/lib/0000755000175000017500000000000014407646417015377 5ustar raviravirspec-block-is-expected-1.0.4/lib/rspec/0000755000175000017500000000000014407646417016513 5ustar raviravirspec-block-is-expected-1.0.4/lib/rspec/block_is_expected/0000755000175000017500000000000014407646417022161 5ustar raviravirspec-block-is-expected-1.0.4/lib/rspec/block_is_expected/version.rb0000644000175000017500000000011514407646417024170 0ustar raviravimodule Rspec module BlockIsExpected VERSION = '1.0.4'.freeze end end rspec-block-is-expected-1.0.4/lib/rspec/block_is_expected/rspec.rb0000644000175000017500000000024014407646417023616 0ustar raviravirequire 'rspec/core' begin RSpec.configure do |c| c.include Rspec::BlockIsExpected end rescue NameError # Rspec really should be loaded by now... end rspec-block-is-expected-1.0.4/lib/rspec/block_is_expected/matchers/0000755000175000017500000000000014407646417023767 5ustar raviravirspec-block-is-expected-1.0.4/lib/rspec/block_is_expected/matchers/not.rb0000644000175000017500000000036414407646417025117 0ustar raviraviRSpec::Matchers.define_negated_matcher :not_change, :change RSpec::Matchers.define_negated_matcher :not_include, :include RSpec::Matchers.define_negated_matcher :not_eq, :eq RSpec::Matchers.define_negated_matcher :not_raise_error, :raise_error rspec-block-is-expected-1.0.4/lib/rspec/block_is_expected.rb0000644000175000017500000000033414407646417022506 0ustar raviravirequire 'rspec/block_is_expected/version' require 'rspec/block_is_expected/rspec' module Rspec # Namespace of this library module BlockIsExpected def block_is_expected expect { subject } end end end rspec-block-is-expected-1.0.4/gemfiles/0000755000175000017500000000000014407646417016424 5ustar raviravirspec-block-is-expected-1.0.4/gemfiles/ruby_head.gemfile0000644000175000017500000000037614407646417021726 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' gem 'simplecov', '~> 0', :require => false end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/ruby_2.5.1.gemfile0000644000175000017500000000037614407646417021470 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' gem 'simplecov', '~> 0', :require => false end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/ruby_2.4.4.gemfile0000644000175000017500000000037614407646417021472 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' gem 'simplecov', '~> 0', :require => false end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/ruby_2.3.7.gemfile0000644000175000017500000000037614407646417021474 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' gem 'simplecov', '~> 0', :require => false end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/ruby_2.2.10.gemfile0000644000175000017500000000037614407646417021545 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' gem 'simplecov', '~> 0', :require => false end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/ruby_2.1.10.gemfile0000644000175000017500000000032114407646417021532 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/ruby_2.0.0_p648.gemfile0000644000175000017500000000046114407646417022236 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do # Some changes to defaults make older version config incompatible with newer version config # gem "rubocop", "~> 0.41.2" gem 'rake' gem 'rspec' end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/ruby_1.9.3_p551.gemfile0000644000175000017500000000046114407646417022242 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do # Some changes to defaults make older version config incompatible with newer version config # gem "rubocop", "~> 0.41.2" gem 'rake' gem 'rspec' end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/ruby_1.8.7_p374.gemfile0000644000175000017500000000046114407646417022250 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do # Some changes to defaults make older version config incompatible with newer version config # gem "rubocop", "~> 0.41.2" gem 'rake' gem 'rspec' end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/jruby_head.gemfile0000644000175000017500000000032114407646417022066 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/jruby_9.2.0.0.gemfile0000644000175000017500000000032114407646417021771 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/jruby_9.1.9.0.gemfile0000644000175000017500000000032114407646417022001 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do gem 'rake' gem 'rspec' gem 'rubocop', '~> 0.52.1' end gemspec :path => '../' rspec-block-is-expected-1.0.4/gemfiles/jruby_1.7.26.gemfile0000644000175000017500000000046114407646417021725 0ustar raviravi# This file was generated by Appraisal source 'https://rubygems.org' group :development do gem 'pry' end group :test do # Some changes to defaults make older version config incompatible with newer version config # gem "rubocop", "~> 0.41.2" gem 'rake' gem 'rspec' end gemspec :path => '../' rspec-block-is-expected-1.0.4/bin/0000755000175000017500000000000014407646417015401 5ustar raviravirspec-block-is-expected-1.0.4/bin/setup0000755000175000017500000000020314407646417016462 0ustar raviravi#!/usr/bin/env bash set -euo pipefail IFS=$'\n\t' set -vx bundle install # Do any other automated setup that you need to do here rspec-block-is-expected-1.0.4/bin/console0000755000175000017500000000054614407646417016776 0ustar raviravi#!/usr/bin/env ruby require 'bundler/setup' require 'rspec/block_is_expected' # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. # (If you use this, don't forget to add pry to your Gemfile!) # require "pry" # Pry.start require 'irb' IRB.start(__FILE__) rspec-block-is-expected-1.0.4/Rakefile0000644000175000017500000000106214407646417016275 0ustar raviravirequire 'bundler/gem_tasks' begin require 'wwtd/tasks' rescue LoadError puts 'failed to load wwtd' end begin require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) rescue LoadError # puts "failed to load wwtd or rspec, probably because bundled --without-development" task :spec do warn 'rspec is disabled' end end desc 'Alias test to spec' task :test => :spec begin require 'rubocop/rake_task' RuboCop::RakeTask.new rescue LoadError task :rubocop do warn 'RuboCop is disabled' end end task :default => [:test, :rubocop] rspec-block-is-expected-1.0.4/README.md0000644000175000017500000002205614407646417016115 0ustar raviravi# Rspec::BlockIsExpected This gem does one very simple thing very well. It allows you to use `block_is_expected` similarly to how you would use `is_expected` if a block was wrapping the subject. Supports the same versions of Ruby that RSpec does, 1.8.7 - current ruby-head, as well as the JRuby equivalents. ```ruby subject { Integer(nil) } it('raises') { block_is_expected.to raise_error(TypeError) } ``` | Project | AnonymousActiveRecord | |------------------------ | ----------------------- | | gem name | [rspec-block_is_expected](https://rubygems.org/gems/rspec-block_is_expected) | | license | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) | | download rank | [![Downloads Today](https://img.shields.io/gem/rd/rspec-block_is_expected.svg)](https://github.com/pboling/rspec-block_is_expected) | | version | [![Version](https://img.shields.io/gem/v/rspec-block_is_expected.svg)](https://rubygems.org/gems/rspec-block_is_expected) | | dependencies | [![Depfu](https://badges.depfu.com/badges/272ce0df3bc6df5cbea9354e2c3b65af/count.svg)](https://depfu.com/github/pboling/rspec-block_is_expected?project_id=5614) | | continuous integration | [![Build Status](https://travis-ci.org/pboling/rspec-block_is_expected.svg?branch=master)](https://travis-ci.org/pboling/rspec-block_is_expected) | | test coverage | [![Test Coverage](https://api.codeclimate.com/v1/badges/ca0a12604ecc19f5e76d/test_coverage)](https://codeclimate.com/github/pboling/rspec-block_is_expected/test_coverage) | | maintainability | [![Maintainability](https://api.codeclimate.com/v1/badges/ca0a12604ecc19f5e76d/maintainability)](https://codeclimate.com/github/pboling/rspec-block_is_expected/maintainability) | | code triage | [![Open Source Helpers](https://www.codetriage.com/pboling/rspec-block_is_expected/badges/users.svg)](https://www.codetriage.com/pboling/rspec-block_is_expected) | | homepage | [on Github.com][homepage], [on Railsbling.com][blogpage] | | documentation | [on RDoc.info][documentation] | | Spread ~♡ⓛⓞⓥⓔ♡~ | [🌏](https://about.me/peter.boling), [👼](https://angel.co/peter-boling), [:shipit:](http://coderwall.com/pboling), [![Tweet Peter](https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow)](http://twitter.com/galtzo)| If you only ever want to test subjects wrapped in blocks, and are comfortable with **losing** the standard `is_expected` behavior, see an alternative to this gem [here](https://github.com/christopheraue/ruby-rspec-is_expected_block/). ## Installation Add this line to your application's Gemfile: ```ruby gem 'rspec-block_is_expected', :group => :test ``` And then execute: $ bundle Or install it yourself as: $ gem install rspec-block_is_expected ## Configuration There is no configuration needed if you your test suite loads the bundle group (e.g. `test`) that you added the gem to. Otherwise, you may load it manually near the top of your `spec_helper.rb`, and it will self configure. ```ruby require 'rspec/block_is_expected' ``` ### RSpec Matchers `block_is_expected` can be used to chain expectations related to the block, but `to_not` doesn't work with multiple expectations. So negated matchers are required. A basic set of them are included with this gem, and can be loaded with: ```ruby require 'rspec/block_is_expected/matchers/not' ``` This gives you the following matchers: ```ruby RSpec::Matchers.define_negated_matcher :not_change, :change RSpec::Matchers.define_negated_matcher :not_include, :include RSpec::Matchers.define_negated_matcher :not_eq, :eq RSpec::Matchers.define_negated_matcher :not_raise_error, :raise_error ``` #### Example You have a module like this: ```ruby module MyTasks def my_rakelib Rake.add_rakelib('bananas') end module_function :my_rakelib end ``` You have a spec like this: ```ruby require 'rake' RSpec.describe(MyTasks) do describe 'my_rakelib' do subject(:my_rakelib) { described_class.my_rakelib } it 'updates rakelib' do block_is_expected.to not_raise_error & change { Rake.application.options.rakelib }.from(['rakelib']).to(%w[rakelib bananas]) end end end ``` ### Integration with RuboCop You'll likely get the following linting error from `rubocop-rspec` if you use `block_is_expected.to ...`: ``` RSpec/NoExpectationExample: No expectation found in this example. ``` To fix it properly you need to register `block_is_expected` as an "expectation". In your `.rubocop.yml` ```yml inherit_gem: rspec-block_is_expected: rubocop.yml ``` ## Usage The spec suite for this gem has some examples of usage, lightly edited here. ```ruby RSpec.describe 'TestyMcTest' do context 'errors raised' do subject { Integer(nil) } it('can be tested') do # Where you used to have: # expect { subject }.to raise_error(TypeError) block_is_expected.to raise_error(TypeError) end end context 'execution' do let(:mutex) { Mutex.new } subject { mutex.lock } it('can change state') do expect(mutex.locked?).to eq(false) # Where you used to have: # expect { subject }.to_not raise_error block_is_expected.to_not raise_error expect(mutex.locked?).to eq(true) end end context 'changed state' do let(:mutex) { Mutex.new } subject { mutex.lock } it('can be tested') do # Where you used to have: # expect { subject }.to change { mutex.locked? }.from(false).to(true) block_is_expected.to change { mutex.locked? }.from(false).to(true) end end end ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Authors [Peter H. Boling][peterboling] of [Rails Bling][railsbling] is the author. ## Contributors See the [Network View](https://github.com/pboling/rspec-block_is_expected/network) and the [CHANGELOG](https://github.com/pboling/rspec-block_is_expected/blob/master/CHANGELOG.md) ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. 6. Create new Pull Request Bug reports and pull requests are welcome on GitHub at https://github.com/pboling/anonymous_active_record. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ## Code of Conduct Everyone interacting in the AnonymousActiveRecord project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/pboling/anonymous_active_record/blob/master/CODE_OF_CONDUCT.md). ## Versioning This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions. As a result of this policy, you can (and should) specify a dependency on this gem using the [Pessimistic Version Constraint][pvc] with two digits of precision. For example in a `Gemfile`: gem 'rspec-block_is_expected', '~> 1.0', group: :test or in a `gemspec` spec.add_development_dependency 'rspec-block_is_expected', '~> 1.0' ## Legal * MIT License - See [LICENSE][license] file in this project [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) * Copyright (c) 2018, 2020, 2023 [Peter H. Boling][peterboling] of [Rails Bling][railsbling] [semver]: http://semver.org/ [pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint [documentation]: http://rdoc.info/github/pboling/rspec-block_is_expected/frames [homepage]: https://github.com/pboling/rspec-block_is_expected [blogpage]: http://www.railsbling.com/tags/rspec-block_is_expected/ [license]: LICENSE [railsbling]: http://www.railsbling.com [peterboling]: https://about.me/peter.boling [refugees]: https://www.crowdrise.com/helprefugeeswithhopefortomorrowliberia/fundraiser/peterboling [gplus]: https://plus.google.com/+PeterBoling/posts [topcoder]: https://www.topcoder.com/members/pboling/ [angellist]: https://angel.co/peter-boling [coderwall]: http://coderwall.com/pboling [twitter]: http://twitter.com/galtzo rspec-block-is-expected-1.0.4/LICENSE0000644000175000017500000000211614407646417015636 0ustar raviraviCopyright (c) 2018, 2020, 2023 Peter H. Boling of RailsBling.com MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. rspec-block-is-expected-1.0.4/Gemfile.lock0000644000175000017500000000450314407646417017055 0ustar raviraviPATH remote: . specs: rspec-block_is_expected (1.0.4) rspec-core GEM remote: https://rubygems.org/ specs: appraisal (2.4.1) bundler rake thor (>= 0.14.0) ast (2.4.2) byebug (10.0.2) coderay (1.1.3) diff-lcs (1.5.0) docile (1.4.0) json (2.6.3) method_source (1.0.0) parallel (1.22.1) parser (3.2.1.1) ast (~> 2.4.1) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) pry-byebug (3.6.0) byebug (~> 10.0) pry (~> 0.10) rainbow (3.1.1) rake (13.0.6) regexp_parser (2.7.0) rexml (3.2.5) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) rspec-mocks (~> 3.12.0) rspec-core (3.12.1) rspec-support (~> 3.12.0) rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-mocks (3.12.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-pending_for (0.1.16) rspec-core ruby_engine (>= 1, < 3) ruby_version (~> 1.0) rspec-support (3.12.0) rubocop (1.48.1) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) rubocop-ast (>= 1.26.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.27.0) parser (>= 3.2.1.0) rubocop-lts (18.1.0) rubocop-ruby2_7 (~> 1.1.3) rubocop-md (1.2.0) rubocop (>= 1.0) rubocop-rake (0.6.0) rubocop (~> 1.0) rubocop-rspec (1.42.0) rubocop (>= 0.87.0) rubocop-ruby2_7 (1.1.3) rubocop (~> 1.48.1) ruby-progressbar (1.13.0) ruby_engine (2.0.0) ruby_version (1.0.2) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) thor (1.2.1) unicode-display_width (2.4.2) wwtd (1.4.1) PLATFORMS arm64-darwin-22 DEPENDENCIES appraisal bundler byebug (~> 10) pry (~> 0) pry-byebug (~> 3) rake rspec (~> 3.8) rspec-block_is_expected! rspec-pending_for (~> 0.1) rubocop-lts (~> 18.0) rubocop-md rubocop-rake rubocop-rspec (~> 1.42) simplecov (~> 0) wwtd BUNDLED WITH 2.4.9 rspec-block-is-expected-1.0.4/Gemfile0000644000175000017500000000127114407646417016125 0ustar raviravisource 'https://rubygems.org' git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } group :test do ruby_version = Gem::Version.new(RUBY_VERSION) if ruby_version >= Gem::Version.new('2.7') gem 'rubocop-lts', '~> 18.0' gem 'rubocop-md' gem 'rubocop-rake' gem 'rubocop-rspec', '~> 1.42' end if ruby_version >= Gem::Version.new('2.0') gem 'byebug', '~> 10', :platform => :mri, :require => false gem 'pry', '~> 0', :platform => :mri, :require => false gem 'pry-byebug', '~> 3', :platform => :mri, :require => false end gem 'simplecov', '~> 0', :require => false end # Specify your gem's dependencies in rspec-block_is_expected.gemspec gemspec rspec-block-is-expected-1.0.4/CODE_OF_CONDUCT.md0000644000175000017500000000623614407646417017437 0ustar raviravi# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at peter.boling@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ rspec-block-is-expected-1.0.4/CHANGELOG.md0000644000175000017500000000107514407646417016445 0ustar raviravi# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog v1](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Added ### Changed ### Fixed ### Removed ## [1.0.4] - 2023-03-23 ### Added - Required ruby version in gemspec >= 1.8.7 ### Changed - Moved rubocop config to root ### Fixed - documentation of rubocop config - Copyright years ## [1.0.3] - 2023-03-23 ### Added - negated matchers - rubocop config rspec-block-is-expected-1.0.4/Appraisals0000644000175000017500000000054214407646417016654 0ustar raviraviappraise 'jruby-1.7.26' do end appraise 'ruby-1.8.7-p371' do end appraise 'ruby-1.9.3-p551' do end appraise 'ruby-2.0.0-p648' do end appraise 'ruby-2.1.10' do end appraise 'ruby-2.2.10' do end appraise 'jruby-9.1.9.0' do end appraise 'ruby-2.3.7' do end appraise 'ruby-2.4.4' do end appraise 'ruby-2.5.1' do end appraise 'jruby-9.2.0.0' do end rspec-block-is-expected-1.0.4/.travis.yml0000644000175000017500000000276614407646417016755 0ustar raviravienv: global: - JRUBY_OPTS="-Xcli.debug=true --debug" - CC_TEST_REPORTER_ID=13484ad644dba9dd92ac41ef387f76b3c24d73a668ed4d044c933ec14943257d before_script: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build script: - bundle exec rspec after_script: - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT before_install: - gem update --system - gem install bundler install: - bundle install bundler_args: --no-deployment --jobs 3 --retry 3 cache: bundler language: ruby sudo: false matrix: allow_failures: - rvm: jruby-head - rvm: ruby-head fast_finish: true include: - rvm: 1.8.7-p374 gemfile: gemfiles/ruby_1.8.7_p374.gemfile - rvm: 1.9.3-p551 gemfile: gemfiles/ruby_1.9.3_p551.gemfile - rvm: 2.0.0-p648 gemfile: gemfiles/ruby_2.0.0_p648.gemfile - rvm: 2.1.10 gemfile: gemfiles/ruby_2.1.10.gemfile - rvm: 2.2.10 gemfile: gemfiles/ruby_2.2.10.gemfile - rvm: 2.3.7 gemfile: gemfiles/ruby_2.3.7.gemfile - rvm: 2.4.4 gemfile: gemfiles/ruby_2.4.4.gemfile - rvm: 2.5.1 gemfile: gemfiles/ruby_2.5.1.gemfile - rvm: ruby-head gemfile: gemfiles/ruby_head.gemfile - rvm: jruby-1.7.26 gemfile: gemfiles/jruby_1.7.26.gemfile - rvm: jruby-9.1.9.0 gemfile: gemfiles/jruby_9.1.9.0.gemfile - rvm: jruby-9.2.0.0 gemfile: gemfiles/jruby_9.2.0.0.gemfile - rvm: jruby-head gemfile: gemfiles/jruby_head.gemfile rspec-block-is-expected-1.0.4/.tool-versions0000644000175000017500000000001314407646417017447 0ustar raviraviruby 3.2.1 rspec-block-is-expected-1.0.4/.rubocop_todo.yml0000644000175000017500000000176014407646417020134 0ustar raviravi# This configuration was generated by # `rubocop --auto-gen-config` # on 2023-03-23 18:29:56 UTC using RuboCop version 1.48.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. # Offense count: 4 # Configuration parameters: EnforcedStyle, AllowedGems, Include. # SupportedStyles: Gemfile, gems.rb, gemspec # Include: **/*.gemspec, **/Gemfile, **/gems.rb Gemspec/DevelopmentDependencies: Exclude: - 'rspec-block_is_expected.gemspec' # Offense count: 1 # Configuration parameters: Severity, Include. # Include: **/*.gemspec Gemspec/RequiredRubyVersion: Exclude: - 'rspec-block_is_expected.gemspec' # Offense count: 11 # Configuration parameters: AllowComments, AllowEmptyLambdas. Lint/EmptyBlock: Exclude: - 'Appraisals' # Offense count: 1 RSpec/MultipleExpectations: Max: 2 rspec-block-is-expected-1.0.4/.rubocop.yml0000644000175000017500000000154114407646417017104 0ustar raviraviinherit_from: - .rubocop_todo.yml require: - rubocop-lts - rubocop-md - rubocop-rake - rubocop-rspec inherit_gem: rubocop-lts: rubocop-lts.yml rspec-block_is_expected: rubocop.yml AllCops: DisplayCopNames: true # Display the name of the failing cops Exclude: - 'gemfiles/vendor/**/*' - 'vendor/**/*' TargetRubyVersion: 2.0 Metrics/BlockLength: AllowedMethods: - context - describe - it - shared_context - shared_examples - shared_examples_for - namespace - draw Layout/LineLength: Enabled: false Style/HashSyntax: EnforcedStyle: hash_rockets Style/Lambda: Enabled: false Style/PercentLiteralDelimiters: Enabled: false Style/SymbolArray: Enabled: false # Enable when drop support for Ruby < 2 Style/ExpandPathArguments: Enabled: false RSpec/FactoryBot/CreateList: Enabled: false rspec-block-is-expected-1.0.4/.rspec0000644000175000017500000000006514407646417015747 0ustar raviravi--format documentation --color --require spec_helper rspec-block-is-expected-1.0.4/.gitignore0000644000175000017500000000024414407646417016621 0ustar raviravi/.bundle/ /.yardoc /*.gem /_yardoc/ /coverage/ /doc/ /pkg/ /spec/reports/ /tmp/ # rspec failure tracking .rspec_status # gemfiles for CI /gemfiles/*.gemfile.lock