examples/analyze_number.rb in flores-0.0.3 vs examples/analyze_number.rb in flores-0.0.4

- old
+ new

@@ -15,18 +15,22 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. require "flores/rspec" require "flores/random" -RSpec.configure do |c| - Flores::RSpec.configure(c) - c.add_formatter("Flores::RSpec::Formatters::Analyze") +RSpec.configure do |config| + Flores::RSpec.configure(config) + Kernel.srand config.seed + + # Demonstrate the wonderful Analyze formatter + config.add_formatter("Flores::RSpec::Formatters::Analyze") end describe "a random number" do + analyze_results + context "between 0 and 200 inclusive" do let(:number) { Flores::Random.number(0..200) } - analyze_results stress_it "should be less than 100" do expect(number).to(be < 100) end end end