diff options
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r-- | gnu/packages/ruby.scm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 1163a869d8..a1b444ce68 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -5265,3 +5265,58 @@ gson.rb, JrJackson, and OkJson.") `(#:tests? #f)) (native-inputs `()))) + +(define-public ruby-rspec-its + (package + (name "ruby-rspec-its") + (version "1.2.0") + (source + (origin + (method url-fetch) + ;; Use GitHub as a source because otherwise we cannot patch directly + (uri (string-append "https://github.com/rspec/rspec-its/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "088f3y7vd3c8g2gpi0z76qabaabfg0fb70ly3d0xqzbani0lrf09")) + (patches + (list + (origin (method url-fetch) + (uri (string-append + "https://github.com/rspec/rspec-its/commit/" + "bfaab439c7c879f5ef25552f41827891f6308373.patch")) + (file-name "ruby-rspec-its-fix-specs-for-ruby-2.4.patch") + (sha256 + (base32 + "0lnik0kvrpgkakvdb2fmzg22pdlraf6kiidr9sv6rnfyviiqwxgh"))))))) + (build-system ruby-build-system) + (arguments + `(#:test-target "spec" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'dont-install-gems-from-gemfile + (lambda _ + (substitute* "Gemfile" + (("rspec rspec-core rspec-expectations rspec-mocks rspec-support") + "")) + #t)) + (add-before 'check 'remove-unnecessary-dependency-versions-from-gemfile + (lambda _ + (substitute* "rspec-its.gemspec" + (("rake.*") "rake'\n") + (("cucumber.*") "cucumber'\n")) + #t))))) + (propagated-inputs + `(("ruby-rspec-core" ,ruby-rspec-core) + ("ruby-rspec-expectations" ,ruby-rspec-expectations))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-cucumber" ,ruby-cucumber) + ("ruby-aruba" ,ruby-aruba))) + (synopsis "RSpec extension that provides the @code{its} method") + (description + "RSpec::Its provides the its method as a short-hand to specify the expected +value of an attribute. For example, one can use @code{its(:size)\\{should +eq(1)\\}}.") + (home-page "https://github.com/rspec/rspec-its") + (license license:expat))) |