Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

its with arguments #553

@dnagir

Description

@dnagir

It is very common to write specs for testing on multiple arguments:

it "should be 1" do
  subject.check(1).should == 1
end

it "should be 22" do
  subject.check(2).should == 2
end

# etc

It would be way MUCH easier to write:

its(:check, 1) { should == 1 }
its(:check, 2) { should == 22 }

It makes it absolutely clear what's happening with 2 lines of code instead of 6.

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