- it "should do nothing with a positive number" do
- result = scope.function_abs(["5678"])
- expect(result).to(eq(5678))
- end
+ it { is_expected.to run.with_params(-34).and_return(34) }
+ it { is_expected.to run.with_params("-34").and_return(34) }
+ it { is_expected.to run.with_params(34).and_return(34) }
+ it { is_expected.to run.with_params("34").and_return(34) }
+ it { is_expected.to run.with_params(-34.5).and_return(34.5) }
+ it { is_expected.to run.with_params("-34.5").and_return(34.5) }
+ it { is_expected.to run.with_params(34.5).and_return(34.5) }
+ it { is_expected.to run.with_params("34.5").and_return(34.5) }