Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lettuce
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
lettuce
Commits
56674ecc
Commit
56674ecc
authored
May 23, 2010
by
Gabriel Falcão
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving images
parent
b05a7472
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
27 deletions
+33
-27
docs/_static/djangodocs.css
+6
-1
docs/tutorial/flow.png
+0
-0
docs/tutorial/screenshot1.png
+0
-0
docs/tutorial/screenshot2.png
+0
-0
docs/tutorial/screenshot3.png
+0
-0
docs/tutorial/screenshot4.png
+0
-0
docs/tutorial/screenshot5.png
+0
-0
docs/tutorial/screenshot6.png
+0
-0
docs/tutorial/screenshot7.png
+0
-0
docs/tutorial/simple.rst
+27
-26
No files found.
docs/_static/djangodocs.css
View file @
56674ecc
...
@@ -78,7 +78,7 @@ div.figure { text-align: center}
...
@@ -78,7 +78,7 @@ div.figure { text-align: center}
div
.figure
p
.caption
{
font-size
:
1em
;
margin-top
:
0
;
margin-bottom
:
1.5em
;
color
:
black
}
div
.figure
p
.caption
{
font-size
:
1em
;
margin-top
:
0
;
margin-bottom
:
1.5em
;
color
:
black
}
hr
{
color
:
#ccc
;
background-color
:
#ccc
;
height
:
1px
;
border
:
0
}
hr
{
color
:
#ccc
;
background-color
:
#ccc
;
height
:
1px
;
border
:
0
}
p
,
ul
,
dl
{
margin-top
:
.6em
;
color
:
#333
}
p
,
ul
,
dl
{
margin-top
:
.6em
;
color
:
#333
}
#yui-main
div
.yui-b
img
{
max-width
:
50em
;
margin-left
:
auto
;
margin-right
:
auto
;
display
:
block
}
#yui-main
div
.yui-b
img
{
max-width
:
50em
;
margin-left
:
auto
;
margin-right
:
auto
;
display
:
block
;
margin-top
:
10px
;
margin-bottom
:
10px
}
caption
{
font-size
:
1em
;
font-weight
:
bold
;
margin-top
:
0.5em
;
margin-bottom
:
0.5em
;
margin-left
:
2px
;
text-align
:
center
}
caption
{
font-size
:
1em
;
font-weight
:
bold
;
margin-top
:
0.5em
;
margin-bottom
:
0.5em
;
margin-left
:
2px
;
text-align
:
center
}
blockquote
{
padding
:
0
1em
;
margin
:
1em
0
;
font
:
125%
/
1.2em
"Trebuchet MS"
,
sans-serif
;
color
:
#234f32
}
blockquote
{
padding
:
0
1em
;
margin
:
1em
0
;
font
:
125%
/
1.2em
"Trebuchet MS"
,
sans-serif
;
color
:
#234f32
}
strong
{
font-weight
:
bold
}
strong
{
font-weight
:
bold
}
...
@@ -169,4 +169,8 @@ div#contents ul ul li { margin-top: 0.3em}
...
@@ -169,4 +169,8 @@ div#contents ul ul li { margin-top: 0.3em}
.footer
a
{
.footer
a
{
color
:
#333
;
color
:
#333
;
}
img
{
margin
:
10px
0
10px
0
;
}
}
\ No newline at end of file
docs/tutorial/flow.png
View replaced file @
b05a7472
View file @
56674ecc
102 KB
|
W:
|
H:
110 KB
|
W:
|
H:
2-up
Swipe
Onion skin
docs/
intro
/screenshot1.png
→
docs/
tutorial
/screenshot1.png
View file @
56674ecc
File moved
docs/
intro
/screenshot2.png
→
docs/
tutorial
/screenshot2.png
View file @
56674ecc
File moved
docs/
intro
/screenshot3.png
→
docs/
tutorial
/screenshot3.png
View file @
56674ecc
File moved
docs/
intro
/screenshot4.png
→
docs/
tutorial
/screenshot4.png
View file @
56674ecc
File moved
docs/
intro
/screenshot5.png
→
docs/
tutorial
/screenshot5.png
View file @
56674ecc
File moved
docs/
intro
/screenshot6.png
→
docs/
tutorial
/screenshot6.png
View file @
56674ecc
File moved
docs/
intro
/screenshot7.png
→
docs/
tutorial
/screenshot7.png
View file @
56674ecc
File moved
docs/tutorial/simple.rst
View file @
56674ecc
...
@@ -63,8 +63,8 @@ First round
...
@@ -63,8 +63,8 @@ First round
-----------
-----------
(a) Describe behaviour in English
[a] describe behaviour
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
Start describing the expected behaviour of factorial in `zero.feature` using English:
Start describing the expected behaviour of factorial in `zero.feature` using English:
...
@@ -87,8 +87,8 @@ Start describing the expected behaviour of factorial in `zero.feature` using Eng
...
@@ -87,8 +87,8 @@ Start describing the expected behaviour of factorial in `zero.feature` using Eng
zero.feature must be inside features directory and its extension must
zero.feature must be inside features directory and its extension must
be .feature. However, you're free to choose its name.
be .feature. However, you're free to choose its name.
(b) Write a step definition in P
ython
[b] define steps in p
ython
~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~
Now, let's define the steps of the scenario, so Lettuce acan
Now, let's define the steps of the scenario, so Lettuce acan
understand the behaviour description. Write `steps.py` file using
understand the behaviour description. Write `steps.py` file using
...
@@ -130,7 +130,7 @@ the idea of how to use Lettuce.
...
@@ -130,7 +130,7 @@ the idea of how to use Lettuce.
**Notice that, until now, we haven't defined the factorial function (it's returning -1).**
**Notice that, until now, we haven't defined the factorial function (it's returning -1).**
(c) R
un and watch it fail
[c] r
un and watch it fail
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~
Go to the tests directory and run from the terminal:
Go to the tests directory and run from the terminal:
...
@@ -149,8 +149,8 @@ won't be reached:
...
@@ -149,8 +149,8 @@ won't be reached:
Our only scenario failed :(
Our only scenario failed :(
Let's solve it...
Let's solve it...
(d) Write code to make the step
pass
[d] write code to make it
pass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Well, by definition, we know that the factorial of 0 is 1. As our only
Well, by definition, we know that the factorial of 0 is 1. As our only
feature is this... we could force factorial to return 1.
feature is this... we could force factorial to return 1.
...
@@ -178,7 +178,7 @@ feature is this... we could force factorial to return 1.
...
@@ -178,7 +178,7 @@ feature is this... we could force factorial to return 1.
def factorial(number):
def factorial(number):
return 1
return 1
(e) R
un again and watch it pass
[e] r
un again and watch it pass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Again, run from the terminal:
Again, run from the terminal:
...
@@ -205,8 +205,8 @@ Second round
...
@@ -205,8 +205,8 @@ Second round
Let's provide more tests so our problem is better described, and so we
Let's provide more tests so our problem is better described, and so we
provide a more accurate implementation of factorial:
provide a more accurate implementation of factorial:
(a) Describe behaviour in English
[a] describe behaviour
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
Let's provide two new scenarios, for numbers 1 and 2:
Let's provide two new scenarios, for numbers 1 and 2:
...
@@ -234,13 +234,13 @@ Let's provide two new scenarios, for numbers 1 and 2:
...
@@ -234,13 +234,13 @@ Let's provide two new scenarios, for numbers 1 and 2:
When I compute its factorial
When I compute its factorial
Then I see the number 2
Then I see the number 2
(b) Write a step definition in P
ython
[b] define steps in p
ython
~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~
As we haven't changed the definition, no need to make changes on this
As we haven't changed the definition, no need to make changes on this
step.
step.
(c) R
un and watch it fail
[c] r
un and watch it fail
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~
...
@@ -256,8 +256,8 @@ fails. :(
...
@@ -256,8 +256,8 @@ fails. :(
.. image:: ./screenshot3.png
.. image:: ./screenshot3.png
(d) Write code to make the step
pass
[d] write code to make it
pass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Let's provide a solution so we get the right factorial for all
Let's provide a solution so we get the right factorial for all
scenarions, specially for number 2:
scenarions, specially for number 2:
...
@@ -289,7 +289,8 @@ scenarions, specially for number 2:
...
@@ -289,7 +289,8 @@ scenarions, specially for number 2:
else:
else:
return number
return number
(e) Run again and watch it pass
[e] run again and watch it pass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. highlight:: bash
.. highlight:: bash
...
@@ -307,8 +308,8 @@ Third round
...
@@ -307,8 +308,8 @@ Third round
Let's provide more tests so our problem is better described and we get
Let's provide more tests so our problem is better described and we get
new errors so we'll be able to solve them.
new errors so we'll be able to solve them.
(a) Describe behaviour in English
[a] describe behaviour
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
.. highlight:: ruby
.. highlight:: ruby
...
@@ -344,13 +345,13 @@ new errors so we'll be able to solve them.
...
@@ -344,13 +345,13 @@ new errors so we'll be able to solve them.
When I compute its factorial
When I compute its factorial
Then I see the number 24
Then I see the number 24
(b) Write a step definition in P
ython
[b] define steps in p
ython
~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~
As we haven't changed the definition, no need to make changes on this
As we haven't changed the definition, no need to make changes on this
step.
step.
(c) R
un and watch it fail
[c] r
un and watch it fail
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~
.. highlight:: bash
.. highlight:: bash
...
@@ -361,8 +362,8 @@ step.
...
@@ -361,8 +362,8 @@ step.
.. image:: ./screenshot5.png
.. image:: ./screenshot5.png
(d) Write code to make the step
pass
[d] write code to make it
pass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. highlight:: python
.. highlight:: python
...
@@ -391,8 +392,8 @@ step.
...
@@ -391,8 +392,8 @@ step.
else:
else:
return number*factorial(number-1)
return number*factorial(number-1)
(e) Run again and see the step
pass
[e] run again and watch it
pass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. highlight:: bash
.. highlight:: bash
...
@@ -451,7 +452,7 @@ reducing "copy & paste" work and making your tests more clear.
...
@@ -451,7 +452,7 @@ reducing "copy & paste" work and making your tests more clear.
.. Note::
.. Note::
If you overwrite zero.feature using the example above, and goto
If you overwrite zero.feature using the example above, and goto
step
(e)
, you'll see your description expanding to the five
step
[e]
, you'll see your description expanding to the five
previous scenarious:
previous scenarious:
.. image:: ./screenshot7.png
.. image:: ./screenshot7.png
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment