This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "when a user exists" do | |
before { @user = Factory :user } | |
context "when I visit the page for editing that user" do | |
before { visit "/users/#{@user.id}/edit" } | |
it {should let_me_edit_the_user} | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with_existing :user do | |
on_visiting edit_user_path do | |
it {should let_me_edit_the_user} | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: Search by topic | |
Given a topic exists | |
And some courses exist covering that topic | |
And other courses exist that do not cover the topic | |
When I search for that topic | |
Then I should see the courses that cover the topic | |
And I should not see the courses that do not cover the topic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: Search by topic | |
Given there are 240 courses which do not have the topic "biology" | |
And there are 2 courses A001, B205 that each have "biology" as one of the topics | |
When I search for "biology" | |
Then I should see the following courses: | |
| Course code | | |
| A001 | | |
| B205 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with_existing :article do | |
on_visiting edit_article_path do | |
it { lets_me_edit_the(:article) } | |
it { shows_failure_on_invalid_update_of(:article) } | |
end | |
where it_is_unpublished do | |
on_visiting articles_path do | |
specify { page.should_not have_content(@article.name) } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.role_perms(role_name) | |
if role_name == :anybody | |
"return true" | |
else | |
"user.acts_as_if? '#{role_name}'" | |
end | |
end | |
def self.access_func(method_name, info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.1"?> | |
<!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 3.0 Language//EN" | |
"http://www.w3.org/2008/SMIL30/SMIL30Language.dtd"> | |
<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language"> | |
<head> | |
<layout> | |
<root-layout width="150" height="200"/> | |
<region xml:id="b" left="0" width="150" top="0" height="150" backgroundColor="purple"/> | |
<region xml:id="t" left="0" width="150" top="150" height="50"/> | |
</layout>` |
NewerOlder