Skip to content

SSHKit::DSL breaks RSpec feature specs #27

@damselem

Description

@damselem

After adding the sshkit gem in a Rails project Gemfile and running RSpec feature specs, I get really strange errors.

group :test do
  gem 'sshkit'
end

If I comment the following line https://github.com/leehambley/sshkit/blob/master/lib/sshkit/dsl.rb#L19 and use the non-dsl API then everything starts working again. I imagine that somehow, the on method overrides some other classes/modules on method.

Here the error when running the specs:

An error occurred in an after hook
  ActionView::Template::Error: no block given
  occurred at /Users/damselem/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-0.0.34/lib/sshkit/backends/netssh.rb:42:in `instance_exec'`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions