Skip to content

Instantly share code, notes, and snippets.

@Supernats
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save Supernats/ae00903bfca3b3814740 to your computer and use it in GitHub Desktop.

Select an option

Save Supernats/ae00903bfca3b3814740 to your computer and use it in GitHub Desktop.
describe "pronoun swapping" do
context "by themselves" do
let(:from) { 'I' }
let(:to) { 'You' }
it "switches 'I' to 'You'" do
expect(WordPlay.switch_pronouns("#{from} computer")).to eq("#{to} computer")
end
it "switches 'You' to 'I'" do
expect(WordPlay.switch_pronouns("#{to} computer")).to eq("#{from} computer")
end
end
context "in a complete clause" do
let(:from) { 'I am' }
let(:to) { 'You are' }
it "switches 'I am' to 'You are'" do
expect(WordPlay.switch_pronouns("#{from} computer")).to eq("#{to} computer")
end
it "switches 'You are' to 'I am'" do
expect(WordPlay.switch_pronouns("#{from} computer")).to eq("#{to} computer")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment