New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add with and only_with chain to be_mounted matcher #84

Merged
merged 1 commit into from May 3, 2013

Conversation

Projects
None yet
1 participant
@mizzy
Owner

mizzy commented May 3, 2013

With this chain, you can test a given path mounted with correct attributes like this.

describe '/' do
  it { should_not be_mounted.with( :type => 'ext4', :options => { :rw => true } ) }
end

describe valid_mount do
  it do
    should be_mounted.only_with(
      :device  => '/dev/mapper/VolGroup-lv_root',
      :type    => 'ext4',
      :options => {
        :rw   => true,
      }
    )
  end
end

only_with needs all attributes of the mounted path.

mizzy added a commit that referenced this pull request May 3, 2013

Merge pull request #84 from mizzy/be_mounted-with-and-only-with
Add with and only_with chain to be_mounted matcher

@mizzy mizzy merged commit eef41db into master May 3, 2013

1 check passed

default The Travis build passed
Details

@mizzy mizzy deleted the be_mounted-with-and-only-with branch May 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment