def test_append_given_adds_right_class_to_givens_in_scenario():
    story = Story(as_a="Someone", i_want_to="do something", so_that="something", identity="Some File")
    scenario = Scenario(index="1", title="Something", story=story)
    args = ["a"]
    kwargs = {"extra_args":"something"}
    scenario.add_given("some action", lambda: None, args, kwargs)
    assert isinstance(scenario.givens[0], Action), "There should be one given of type Action in the scenario but there was %s" % scenario.givens[0].__class__
def test_append_given_adds_to_givens_in_scenario():
    story = Story(as_a="Someone", i_want_to="do something", so_that="something", identity="Some File")
    scenario = Scenario(index="1", title="Something", story=story)
    args = ["a"]
    kwargs = {"extra_args":"something"}
    scenario.add_given("some action", lambda: None, args, kwargs)
    assert len(scenario.givens) == 1, "There should be one given in the scenario but there was %d" % len(scenario.givens)
Exemplo n.º 3
0
def test_append_given_adds_right_class_to_givens_in_scenario():
    story = Story(as_a="Someone",
                  i_want_to="do something",
                  so_that="something",
                  identity="Some File")
    scenario = Scenario(index="1", title="Something", story=story)
    args = ["a"]
    kwargs = {"extra_args": "something"}
    scenario.add_given("some action", lambda: None, args, kwargs)
    assert isinstance(
        scenario.givens[0], Action
    ), "There should be one given of type Action in the scenario but there was %s" % scenario.givens[
        0].__class__
Exemplo n.º 4
0
def test_append_given_adds_to_givens_in_scenario():
    story = Story(as_a="Someone",
                  i_want_to="do something",
                  so_that="something",
                  identity="Some File")
    scenario = Scenario(index="1", title="Something", story=story)
    args = ["a"]
    kwargs = {"extra_args": "something"}
    scenario.add_given("some action", lambda: None, args, kwargs)
    assert len(
        scenario.givens
    ) == 1, "There should be one given in the scenario but there was %d" % len(
        scenario.givens)