Skip to content

Commit

Permalink
upgrade sure version and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spulec committed Jan 21, 2013
1 parent a100671 commit 9247393
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -31,7 +31,7 @@ documentation:


clean: clean:
@printf "Cleaning up files that are already in .gitignore... " @printf "Cleaning up files that are already in .gitignore... "
@for pattern in `cat .gitignore`; do find . -name "$$pattern" -delete; done #@for pattern in `cat .gitignore`; do find . -name "$$pattern" -delete; done
@echo "OK!" @echo "OK!"


withdraw-documentation: withdraw-documentation:
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Expand Up @@ -4,13 +4,14 @@ Pygments==1.5
Sphinx==1.1.3 Sphinx==1.1.3
coverage==3.5.2 coverage==3.5.2
cssselect==0.7.1 cssselect==0.7.1
distribute==0.6.27 distribute==0.6.32
docutils==0.9.1 docutils==0.9.1
fuzzywuzzy==0.1 fuzzywuzzy==0.1
lxml lxml
mock==1.0b1 mock==1.0b1
mox==0.5.3 mox==0.5.3
nose==1.1.2 nose==1.1.2
sure==1.0.6 #sure==1.0.6
https://github.com/gabrielfalcao/sure/tarball/7d51e447e86b5beee11638c10a9d93f6f032d4e5
tornado==2.3 tornado==2.3
tox==1.4.2 tox==1.4.2
3 changes: 3 additions & 0 deletions setup.py
Expand Up @@ -52,4 +52,7 @@ def get_packages():
package_data={ package_data={
'lettuce': ['COPYING', '*.md'], 'lettuce': ['COPYING', '*.md'],
}, },
dependency_links=[
"git+git://github.com/spulec/sure.git@py3k#egg=sure"
],
) )
14 changes: 7 additions & 7 deletions tests/unit/test_feature_parser.py
Expand Up @@ -14,7 +14,7 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sure import that, expect from sure import expect
from lettuce import step from lettuce import step
from lettuce.core import Scenario from lettuce.core import Scenario
from lettuce.core import Feature from lettuce.core import Feature
Expand Down Expand Up @@ -559,7 +559,7 @@ def test_single_scenario_single_scenario():


first_scenario = feature.scenarios[0] first_scenario = feature.scenarios[0]


assert that(first_scenario.tags).deep_equals([ expect(first_scenario.tags).should.equal([
'many', 'other', 'basic', 'tags', 'here', ':)']) 'many', 'other', 'basic', 'tags', 'here', ':)'])




Expand All @@ -580,21 +580,21 @@ def inspected_within_object(step):


@step(r'fill my email with [\'"]?([^\'"]+)[\'"]?') @step(r'fill my email with [\'"]?([^\'"]+)[\'"]?')
def fill_email(step, email): def fill_email(step, email):
assert that(email).equals('gabriel@lettuce.it') assert expect(email).equals('gabriel@lettuce.it')


feature = Feature.from_string(FEATURE13) feature = Feature.from_string(FEATURE13)


first_scenario = feature.scenarios[0] first_scenario = feature.scenarios[0]
assert that(first_scenario.tags).equals(['runme']) assert expect(first_scenario.tags).equals(['runme'])


second_scenario = feature.scenarios[1] second_scenario = feature.scenarios[1]
assert that(second_scenario.tags).equals([]) assert expect(second_scenario.tags).equals([])


third_scenario = feature.scenarios[2] third_scenario = feature.scenarios[2]
assert that(third_scenario.tags).equals(['slow']) assert expect(third_scenario.tags).equals(['slow'])


last_scenario = feature.scenarios[3] last_scenario = feature.scenarios[3]
assert that(last_scenario.tags).equals([]) assert expect(last_scenario.tags).equals([])


result = feature.run() result = feature.run()
print print
Expand Down

0 comments on commit 9247393

Please sign in to comment.