That code violates Tell, Don't Ask..
You could also say it exhibits the feature envy smell.
(Violating Tell, Don't Ask and having feature envy are pretty much two sides of the same coin.)
That code violates Tell, Don't Ask..
You could also say it exhibits the feature envy smell.
(Violating Tell, Don't Ask and having feature envy are pretty much two sides of the same coin.)
What testing code smell do we have here?
describe "#full_name" do
it "returns a concatenated full name" do
user = User.new
allow(user).to receive(:first_name).and_return("John")
allow(user).to receive(:last_name).and_return("Smith")
expect(user.full_name).to eq("John Smith")
end
end