<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bsinha</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bsinha"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Bsinha"/>
	<updated>2026-05-13T11:45:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=104012</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=104012"/>
		<updated>2016-10-30T00:02:38Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
[https://en.wikipedia.org/wiki/Code_refactoring '''Refactoring'''] is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, to improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we log in as instructor got to list page and click on Create Team Link. On this page, we test that it should contain the string 'Inherit Teams From Course'. &lt;br /&gt;
To do this test manually, user need lo log in as an Instructor and navigate to assignments page for any course. There the user can click on 'Create Teams' icon and will be redirected to the Create teams page for an assignment, there the user can check for the 'inherit teams' button in the view, ideally, it should be there.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps in the previous case but finally, we test that the page does NOT contain 'Inherit Teams from Course'.&lt;br /&gt;
To do this test manually, user need lo log in as an Instructor and navigate to courses page. There the user can click on 'Create Teams' icon and will be redirected to 'create team' page, ideally, the 'Inherit Teams' button should not be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object defined as an assignment with the course set to nil.&lt;br /&gt;
This can not be tested manually because assignment cannot be created without a course parent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
This test cannot be performed manually as it is testing the count of a database table.&lt;br /&gt;
But, the user can check this functionality online by logging in as an instructor, going to the assignment page of any course and clicking on 'create teams' icon. Following up with entering the required details and clicking on 'create team'.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test an be applied to create a course team as well.&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1. &lt;br /&gt;
The user can check this test manually by logging in as an instructor navigating to the page of any team for an assignment and clicking on 'Delete Team' icon. &lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Same Delete test has been applied to the course team&lt;br /&gt;
The manual check can also be performed in a similar way by logging in as an instructor navigating to the page of any team for an assignment and clicking on 'Delete Team' icon.&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
To do this test manually user can log into the system as an instructor and click on any course, the course teams will be displayed. Also, the user can click on any team node to view information about that team.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bhaskarsinha1311/expertiza/ Github] link to the project.&lt;br /&gt;
* [https://docs.google.com/document/d/1TFC0G3zW-xkJYuloh_BmvWnj3dGZB23GOIYuikNRf_I/edit Link] to the project description.&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103876</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103876"/>
		<updated>2016-10-29T04:15:14Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Refactoring */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
[https://en.wikipedia.org/wiki/Code_refactoring '''Refactoring'''] is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, to improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1.&lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bhaskarsinha1311/expertiza/ Github] link to the project.&lt;br /&gt;
* [https://docs.google.com/document/d/1TFC0G3zW-xkJYuloh_BmvWnj3dGZB23GOIYuikNRf_I/edit Link] to the project description.&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103873</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103873"/>
		<updated>2016-10-29T04:14:07Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''[[https://en.wikipedia.org/wiki/Code_refactoring]] is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, to improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1.&lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bhaskarsinha1311/expertiza/ Github] link to the project.&lt;br /&gt;
* [https://docs.google.com/document/d/1TFC0G3zW-xkJYuloh_BmvWnj3dGZB23GOIYuikNRf_I/edit Link] to the project description.&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103870</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103870"/>
		<updated>2016-10-29T04:11:18Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''[[https://en.wikipedia.org/wiki/Code_refactoring]] is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, to improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1.&lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
1. [https://github.com/bhaskarsinha1311/expertiza/ Github] link to the project.&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103869</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103869"/>
		<updated>2016-10-29T04:09:59Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''[[https://en.wikipedia.org/wiki/Code_refactoring]] is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, to improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1.&lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
1. [https://github.com/bhaskarsinha1311/expertiza/ Github] link to project.&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103865</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103865"/>
		<updated>2016-10-29T04:06:03Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Refactoring */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''[[https://en.wikipedia.org/wiki/Code_refactoring]] is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, to improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1.&lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
1. [[Github link to project https://github.com/bhaskarsinha1311/expertiza]]&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103863</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103863"/>
		<updated>2016-10-29T04:05:33Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Refactoring */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, to improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1.&lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
1. [[Github link to project https://github.com/bhaskarsinha1311/expertiza]]&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103861</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103861"/>
		<updated>2016-10-29T04:04:54Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1.&lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
1. [[Github link to project https://github.com/bhaskarsinha1311/expertiza]]&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103860</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103860"/>
		<updated>2016-10-29T04:04:22Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
The delete method should work for deleting both assignment and course teams. We check this functionality by deleting the respective team and then check if the count of Teams goes down by 1.&lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
The list method lists all the team nodes. This test that we have written, checks whether the instructor is able to view the team nodes in the list view.&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
1. &amp;lt;ref&amp;gt; Github link to project https://github.com/bhaskarsinha1311/expertiza&amp;lt;/ref&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103856</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103856"/>
		<updated>2016-10-29T04:02:39Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644: Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Changes to View == &lt;br /&gt;
To fix the view for ''inherit teams'' functionality, changes to the view were made.&lt;br /&gt;
&lt;br /&gt;
Initially, the code was:&lt;br /&gt;
&lt;br /&gt;
  Inherit Teams From Course&lt;br /&gt;
  Use the teams that are currently defined for the course.&lt;br /&gt;
 &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
   &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
   &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which was changed to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% if not @parent.instance_of?(Course) and not @parent.course.nil? %&amp;gt;&lt;br /&gt;
    Inherit Teams From Course &lt;br /&gt;
    Use the teams that are currently defined for the course.&lt;br /&gt;
   &amp;lt;%= form_tag :action =&amp;gt; 'inherit' do %&amp;gt;&lt;br /&gt;
     &amp;lt;%= hidden_field_tag 'id', @parent.id %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;%= submit_tag &amp;quot;Inherit&amp;quot; %&amp;gt;&lt;br /&gt;
  &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix the view, in the ''new.html.erb'' file of teams, we enclose the inherit teams section in an ''if condition'' that checks that the parent of the team is not a Course and it is not an Assignment whose course is nil.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
To test that while creating an assignment team, the inherit teams section should be displayed, we login as instructor got to list page and click on Create Team Link. On this page we test that it should contain the string 'Inherit Teams From Course'.&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
To test that while creating a course team, the inherit teams section should not be displayed, we do same steps as previous case but finally we test that the page does NOT contain 'Inherit Teams from Course'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Similiarly, for creating a team for an assignment without a course, we test that the page does not contain 'Inherit Teams From Course'. For this particular test case, we added a new factory object for that defined an assignment with course set to nil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
This test checks that after creating an assignment team the count in the teams table increase by 1.&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;POST #create&amp;quot; do&lt;br /&gt;
    context &amp;quot;with an assignment team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases count by 1&amp;quot; do	&lt;br /&gt;
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
     it &amp;quot;redirects to the list page&amp;quot; do&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The same test for a course team as well&lt;br /&gt;
&lt;br /&gt;
    context &amp;quot;with a course team&amp;quot; do&lt;br /&gt;
      it &amp;quot;increases the count by 1&amp;quot; do&lt;br /&gt;
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
   context &amp;quot;with an assignment team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes an assignment team&amp;quot; do&lt;br /&gt;
        @assignment = create(:assignment)&lt;br /&gt;
        @a_team = create(:assignment_team)&lt;br /&gt;
        expect{ @a_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    context &amp;quot;with a course team &amp;quot; do&lt;br /&gt;
      it &amp;quot;deletes a course team&amp;quot; do&lt;br /&gt;
        @course = create(:course)&lt;br /&gt;
        @c_team = create(:course_team)&lt;br /&gt;
        expect{ @c_team.delete }.to change(Team, :count).by(-1)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;br /&gt;
&lt;br /&gt;
 describe 'List Team' do&lt;br /&gt;
 &lt;br /&gt;
   it 'should list all team nodes' do&lt;br /&gt;
     create(:assignment)&lt;br /&gt;
     create(:assignment_node)&lt;br /&gt;
     assignment_team = create(:assignment_team)&lt;br /&gt;
    team_user = create(:team_user)&lt;br /&gt;
     login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
     visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
     page.all('#theTable tr').each do |tr|&lt;br /&gt;
       expect(tr).to have_content?(assignment_team.name)&lt;br /&gt;
     end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
1. &amp;lt;ref&amp;gt; Github link to project https://github.com/bhaskarsinha1311/expertiza&amp;lt;/ref&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103677</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103677"/>
		<updated>2016-10-29T02:27:57Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Testing Inherit Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103676</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103676"/>
		<updated>2016-10-29T02:27:30Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Testing Inherit Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103675</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103675"/>
		<updated>2016-10-29T02:26:59Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Testing Inherit Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103673</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103673"/>
		<updated>2016-10-29T02:25:43Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Testing Inherit Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
&lt;br /&gt;
describe 'should not view inherit teams' do&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103670</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103670"/>
		<updated>2016-10-29T02:24:38Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Testing Inherit Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
&lt;br /&gt;
require 'rails_helper'&lt;br /&gt;
describe 'should not view inherit teams' do&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103668</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103668"/>
		<updated>2016-10-29T02:24:10Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Testing Inherit Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
require 'rails_helper'&lt;br /&gt;
describe 'should not view inherit teams' do&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
  it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
  it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103666</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103666"/>
		<updated>2016-10-29T02:22:44Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Testing the Teams_Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
describe 'should not view inherit teams' do&lt;br /&gt;
&lt;br /&gt;
  it 'should display inherit teams while creating an assignment team' do&lt;br /&gt;
    create(:assignment)&lt;br /&gt;
    create(:assignment_node)&lt;br /&gt;
    create(:assignment_team)&lt;br /&gt;
&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
   it 'should not display inherit teams while creating a course team' do&lt;br /&gt;
    create(:course)&lt;br /&gt;
    create(:course_node)&lt;br /&gt;
    create(:course_team)&lt;br /&gt;
&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Course'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
   it 'should not display inherit teams while creating team for an assignment without a course' do&lt;br /&gt;
    create(:assignment_without_course)&lt;br /&gt;
    create(:assignment_without_course_node)&lt;br /&gt;
    create(:assignment_without_course_team)&lt;br /&gt;
&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)    &lt;br /&gt;
    visit '/teams/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
    click_link 'Create Team'&lt;br /&gt;
    expect(page).to have_no_content('Inherit Teams From Course')&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Testing Create Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Delete Method===&lt;br /&gt;
&lt;br /&gt;
===Testing Inherit Method===&lt;br /&gt;
&lt;br /&gt;
===Testing List Method===&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103639</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103639"/>
		<updated>2016-10-29T02:07:32Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Testing the Teams_Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;br /&gt;
 {{&lt;br /&gt;
vfdvfvfdv&lt;br /&gt;
fdvdfvfdv&lt;br /&gt;
fdvdfdfvfdv&lt;br /&gt;
dfvdfvdfv&lt;br /&gt;
dfvfdvdvdfvdf&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103597</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103597"/>
		<updated>2016-10-29T01:44:56Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Refactoring */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
As the part of the project, the variable ''@signUps'' in the delete method in the teams_controller was changed to snake case, tp improve readability of code.&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103565</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103565"/>
		<updated>2016-10-29T01:25:12Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103562</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103562"/>
		<updated>2016-10-29T01:24:40Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103559</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103559"/>
		<updated>2016-10-29T01:23:23Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103557</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103557"/>
		<updated>2016-10-29T01:21:47Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103555</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103555"/>
		<updated>2016-10-29T01:20:28Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103550</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103550"/>
		<updated>2016-10-29T01:18:33Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Create Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Why refactoring?==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both, creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to create course teams.&lt;br /&gt;
* To verify that the Instructor is able to create assignment teams.&lt;br /&gt;
&lt;br /&gt;
===Delete Method===&lt;br /&gt;
The method '''Delete''' is called when an instructor tries to delete a team manually. This works for both, deleting ''assignment teams'' and ''course teams''.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To verify that the Instructor is able to delete course teams.&lt;br /&gt;
* To verify that the Instructor is able to delete assignment teams.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The method '''List''' lists all the team nodes and the instructor is able to expand each team node to see the user nodes as well.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that all teams are being listed in the view.&lt;br /&gt;
&lt;br /&gt;
===Inherit Method===&lt;br /&gt;
The method '''Inherit''' inherits teams from course to assignments, but the “Inherit Teams From Course” option should not display when either 1) we are editing a course object or 2) the current assignment object does not have a course associated with it.&lt;br /&gt;
&lt;br /&gt;
Following Test Cases were written and executed in RSpec to test this method:&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is displayed while creating an assignment team.&lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating a course team. &lt;br /&gt;
&lt;br /&gt;
* To check that ''inherit teams'' is not displayed while creating teams for an assignment without a course.&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103442</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103442"/>
		<updated>2016-10-29T00:34:19Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Why refactoring?==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some GUI's changes had to be made because they did not work the way they should have, some minor issues in the code were fixed and tests were written in '''RSpec''' for the methods delete, create, create teams, list and inherit.&lt;br /&gt;
&lt;br /&gt;
===Create Method===&lt;br /&gt;
The method '''Create''' is called when an instructor tries to create a team manually. This works for both creating ''assignment teams'' and ''course teams''. Assignment teams are teams made to do a particular assignment together and ''Course Teams'' are teams which are made for the whole course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Refactor variable -&amp;gt; @signUps to snake case.&lt;br /&gt;
* Writing tests for Create method.&lt;br /&gt;
* Writing tests for Delete method.&lt;br /&gt;
* Writing tests for List method.&lt;br /&gt;
* Writing tests for Inherit method&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103428</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103428"/>
		<updated>2016-10-29T00:26:22Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Why refactoring?==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
'''Teams_Controller''' primarily handles the team creation, deletion and other behaviours. Most of those are called from the instructor’s view. When manual testing is done, most of the methods can be called by clicking the “Create teams” icon from both assignments and courses. &lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
As a part of the project, some UI's had to be changed because they did not work the way they should have, some minor issues in the code were fixed and tests were written in RSpec for the methods delete, create, create teams, list and inherit. &lt;br /&gt;
&lt;br /&gt;
* Refactor variable -&amp;gt; @signUps to snake case.&lt;br /&gt;
* Writing tests for Create method.&lt;br /&gt;
* Writing tests for Delete method.&lt;br /&gt;
* Writing tests for List method.&lt;br /&gt;
* Writing tests for Inherit method&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103311</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103311"/>
		<updated>2016-10-28T23:37:29Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Why refactoring?==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
Refactor '''Teams_Controller''' controller.&lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
* Refactor variable -&amp;gt; @signUps to snake case.&lt;br /&gt;
* Writing tests for Create method.&lt;br /&gt;
* Writing tests for Delete method.&lt;br /&gt;
* Writing tests for List method.&lt;br /&gt;
* Writing tests for Inherit method&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103310</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103310"/>
		<updated>2016-10-28T23:37:04Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in [https://en.wikipedia.org/wiki/RSpec/ RSpec] to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Why refactoring?==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
Refactor '''Teams_Controller''' controller.&lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
* Refactor variable -&amp;gt; @signUps to snake case.&lt;br /&gt;
* Writing tests for Create method.&lt;br /&gt;
* Writing tests for Delete method.&lt;br /&gt;
* Writing tests for List method.&lt;br /&gt;
* Writing tests for Inherit method&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103308</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=103308"/>
		<updated>2016-10-28T23:35:30Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test 'Teams_Controller' Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the 'Teams_Controller' Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. The project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in '''RSpec'''&amp;lt;ref&amp;gt;RSpec https://en.wikipedia.org/wiki/RSpec&amp;lt;/ref&amp;gt; to verify the methods it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Why refactoring?==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
Refactor '''Teams_Controller''' controller.&lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
* Refactor variable -&amp;gt; @signUps to snake case.&lt;br /&gt;
* Writing tests for Create method.&lt;br /&gt;
* Writing tests for Delete method.&lt;br /&gt;
* Writing tests for List method.&lt;br /&gt;
* Writing tests for Inherit method&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=102698</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=102698"/>
		<updated>2016-10-28T05:18:36Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test Teams Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the Teams Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting pre-existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. This project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in RSpec to verify the functionalities it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Why refactoring?==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
Refactor '''Teams_Controller''' controller.&lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
* Refactor variable -&amp;gt; @signUps to snake case.&lt;br /&gt;
* Writing tests for Create method.&lt;br /&gt;
* Writing tests for Delete method.&lt;br /&gt;
* Writing tests for List method.&lt;br /&gt;
* Writing tests for Inherit method&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=102697</id>
		<title>CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1644._Refactor_and_test_Teams_Controller&amp;diff=102697"/>
		<updated>2016-10-28T05:17:33Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: Created page with &amp;quot;'''E1644. Refactor and Test Teams Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;  This page provides a brief description of the '''Expertiza''' project. ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1644. Refactor and Test Teams Controller'''&amp;lt;ref&amp;gt;Project Description document https://google.com&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page provides a brief description of the '''Expertiza''' project. The project is aimed at refactoring and testing the Teams Controller, which contains the methods to create new teams, list the existing teams, create new teams by inheriting pre-existing teams, deleting existing teams and creating multiple teams at once by assigning them random topics. This project entailed, refactoring some part of the controller to improve the readability of code and then creating test cases in RSpec to verify the functionalities it possesses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction to Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. &lt;br /&gt;
Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Why refactoring?==&lt;br /&gt;
'''Refactoring'''&amp;lt;ref&amp;gt;Refactoring https://en.wikipedia.org/wiki/Code_refactoring&amp;lt;/ref&amp;gt; is restructuring of code without the need of changing any external behavior. It reduces complexity and improves readability. It also becomes easy to extend the application with respect to different modules and their functionalities.&lt;br /&gt;
Some common techniques to refactor are:&lt;br /&gt;
&lt;br /&gt;
* Moving methods to appropriate modules&lt;br /&gt;
* Breaking methods into more meaningful functionality&lt;br /&gt;
* Creating more generalized code.&lt;br /&gt;
* Renaming methods and variable.&lt;br /&gt;
* Inheritance&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
Refactor '''Teams_Controller''' controller.&lt;br /&gt;
The following tasks have been performed as per the requirements.&lt;br /&gt;
&lt;br /&gt;
* Refactor variable -&amp;gt; @signUps to snake case.&lt;br /&gt;
* Writing tests for Create method.&lt;br /&gt;
* Writing tests for Delete method.&lt;br /&gt;
* Writing tests for List method.&lt;br /&gt;
* Writing tests for Inherit method&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
== Testing the Teams_Controller ==&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=102667</id>
		<title>CSC/ECE 517 Fall 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=102667"/>
		<updated>2016-10-28T04:23:31Z</updated>

		<summary type="html">&lt;p&gt;Bsinha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.example.com link title]==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (Firebrick JS)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Active Job)]]&lt;br /&gt;
==Writing Assignments 2==&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1666. Test team functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1631. Refactoring Bidding Interface]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1668.Test e-mailing functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1658. Refractor lottery_controller.rb and write integration tests]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1650. Sort instructor views alphabetically by default]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller]]&lt;/div&gt;</summary>
		<author><name>Bsinha</name></author>
	</entry>
</feed>