Created
February 24, 2016 03:59
-
-
Save sameera207/35dbcee6000f06abcdc5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "Description" do | |
before(:each) do | |
group | |
end | |
context "is less than 25 characters" do | |
context "without line breaks" do | |
before(:each) { row[:Description] = "123456789012345678901234" } | |
it { is_expected.to be false } | |
end | |
context "with line breaks" do | |
before(:each) { row[:Description] = "<br>123456789<br/>0123456<br />78901234" } | |
it { is_expected.to be false } | |
end | |
end | |
context "is 25 or more characters" do | |
context "without line breaks" do | |
before(:each) { row[:Description] = "1234567890123456789012345" } | |
specify { expect(new_listing.personality).to eq "1234567890123456789012345" } | |
it { is_expected.to be true } | |
end | |
context "with line breaks" do | |
before(:each) { row[:Description] = "<br>12345678<br/>90123456789<br />012345" } | |
str =<<EOF | |
12345678 | |
90123456789 | |
012345 | |
EOF | |
specify { expect(new_listing.personality).to eq str.chomp } | |
it { is_expected.to be true } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment