RSpec Code Examples

 

 

Context::View
should set the context on creation0.00140s
should use the widgets to add a view0.00171s
should use the widgets to remove a view0.00165s
Context::PageView
should close the context when the view is closed0.00054s
Context::Gtk::PageView
should have a widget when initialized0.00112s
should add widgets from another view when added0.00171s
should remove widgets from another view when removed0.00132s
should react to destroy signals0.00093s
Context::Bridge
should reference classes in the namespace provided0.00161s
Context::Publisher
should have a source0.00058s
should be able to subscribe to a publisher0.00066s
should be able to update streams that aren't subscribed to0.00055s
should be able to subscribe multiple targets to a publisher0.00089s
should be able to change the source0.00062s
Context::Context
should not have a parent set on creation0.00059s
should set the parent on entry0.00112s
should add new views to the main view0.00060s
should remove views on exit0.00087s
should create the views on entry0.00081s
should destroy the views on exit0.00137s
should keep track if the context has been entered or not0.00253s
Kernel
should have a unit test for require_all0.04713s
Context::Gtk::App
should start the Gtk main loop when run0.04399s
should quit the Gtk main loop when quit0.00095s
Context::Gtk::Widget
should keep track of the main Window0.01379s
Browse Items - Edit an item from the vocabulary list
should be display all the vocabulary0.03002s
should be able to edit one of the items0.02015s
Time Limit Story - Review Set items have time limits
should start the thinkingTimer when a new problem is created0.01933s
should stop the thinkingTimer when a problem is answered0.02028s
should not have time limits on New Set Items0.01942s
should not have time limits on Working Set Items0.01965s
should not have time limits on newly promoted Review Set Items0.02027s
should add a time limit after the first review0.02033s
should be able to round the time limit to 3 decimals0.01926s
should save the time limit to 3 decimals and read it back in0.02002s
Can Input and Output Vocabularies - Special characters should be entered properly.
should handle quotes0.00414s
should handle definition and marker lists with quotes0.00490s
should handle returns0.00862s
should handle definition and marker lists with returns0.00332s
should handle commas0.00410s
should be able to handle akeru0.00267s
should be able to handle tojiru0.00222s
should handle slashes0.00526s
Edit a Problem - Delete the kanji in a KanjiProblem
should be able to generate a kanji problem0.01851s
should redo the the problem if the Kanji is removed0.02428s
Edit a Problem - Edit the problem to create a duplicate.
should not accept a duplicate vocabulary0.02110s
should accept an altered vocabulary0.01986s
JLDrill::Gtk::MainWindowView
should have a widget when initialized0.09469s
should react to destroy signals0.03200s
should have an icon0.03288s
JLDrill::Gtk::StatisticsView
should close the view when the window is destroyed0.04980s
JLDrill opens a file. - Gets the filename from the user
should automatically exit the context after entry0.17881s
should destroy the selectorWindow when it closes0.10549s
should set the filename and directory on OK0.20532s
should not set the filename and directory on CANCEL0.11508s
Pop up kanji info - The user should see kanji information
should load the kanji info0.04362s
should be able to find the kanji items0.03298s
Quiz Status is Displayed - The DisplayQuizStatusContext is entered when the MainContext is entered
should have a DisplayQuizStatusContext0.00152s
should enter the DisplayQuizStatusContext when the MainContext is entered0.00176s
Quiz Status is Displayed - The DisplayQuizStatusContext is exited when the MainContext is exited
it should exit the DisplayQuizStatus Context when the MainContext is exited0.00194s
Quiz Status is Displayed - There is a view that displays the status of the quiz
has a view0.00230s
should add the view to bottom of the Gtk MainWindowView0.00019s
displays the status of the quiz in the Gtk view0.03317s
Quiz Status is Displayed - The view is updated whenever the status of the quiz changes
should update the status of the quiz when the context is entered0.03364s
should receive updates when the quiz status changes0.00180s
Each Problem Type has a Schedule - File stores the problem types
The problem types should have names0.02063s
should be able to clone each of the problems0.02109s
should print the name for to_s0.02044s
Can parse CEDict dictionary. - CEDictionary can parse entries
should read CEDict entries0.00181s
JLDrill::ItemStatus
should be able to parse vocabulary from strings0.00762s
should be able to set a lastReviewed time on the object0.00727s
should be able to write the last reviewed time to file0.00663s
should be able to parse the information in the file0.00850s
should be able to write consecutive to file0.00657s
should schedule new items to maximum value by default0.00761s
should schedule old items to based on their elapsed time0.00805s
should set a minimum schedule based on difficulty0.00774s
should be able to write duration to file0.00695s
should be able to parse the schedule information in the file0.00797s
should be able to clear the schedule0.00718s
should keep track of the number of times incorrect0.00654s
should keep a difficulty level equal to the number of times it was incorrect the last time it was in the working set0.00641s
should choose the longest interval with 0 difficulty0.00645s
should decrement the interval by 20 percent from difficulty 1 to 5, down to 1 day0.00983s
should decrement the interval from 1 day approaching 0 days as difficulty increases from 60.18633s
should be able to calculate the difficulty based on the interval that has passed.0.07474s
should modify the difficulty when the item is correctly answered0.00910s
should be able to tell if an item has duration in a range0.00832s
should be able to show the reviewed date0.00678s
Can Load Edict in EUC - Edict can parse EUC entries
should convert EUC data to UTF80.00235s
should be able to parse いってき0.00248s
JLDrill::Kana
should be able to parse an entry from the kana file0.00400s
should be able to parse entries with multiple romaji0.00199s
should be able to create a string from the entry0.00116s
should be able to parse a file in a string0.00432s
should be able to parse a file on disk0.01823s
Pop up kanji info - The user should see kana information
should load the kana info0.02977s
should be able to find the kana items0.02738s
User Loads Dictionary - You can load the reference from AddNewVocabulary
should load the reference when requested0.00185s
User Loads Dictionary - You can load the reference from EditVocabulary
should load the reference when requested0.01944s
User Loads Dictionary - The dictionary to load is in the save file.
should save the dictionary filename in the save file0.00281s
should load the dictionary relative to the install directory0.01674s
Problems are displayed - The DisplayProblemContext is entered when the MainContext is entered
should have a DisplayProblemContext0.00179s
should enter the DisplayProblemContext when the app starts0.00164s
Problems are displayed - The DisplayProblemContext is exited when the MainContext is exited
should exit the DisplayProblemContext when the MainContext is exited0.00188s
Problems are displayed - There is a view that displays current Problem
The display should be updated when the application starts0.00168s
should display a problem when a file is loaded0.14916s
should refresh the display when the current vocab has been edited0.02948s
should display each of the items in the problem0.06304s
should have the correct text in the display0.06304s
Problems are displayed - Embedded returns and quotes are displayed
has been tested in the Vocabulary spec0.00019s
Problems are displayed - The ProblemView contains ItemHintsView.
notifies the ItemHintsView when there is a new problem0.02714s
should notify the ItemHintsView when the problem is updated0.02687s
Find the closest match - Find the number of common bytes
should return 0 for dissimilar strings0.00092s
should count common characters at the beginning of the string0.00164s
should return 0 for empty and nil strings0.00190s
should work with UTF-8 characters0.00197s
Find the closest match - Find the rank between two vocabs
should return 0 for nil objects0.00066s
should return the number of common bytes in the reading0.00209s
should use the kanji if it exists0.00271s
should use the definitions0.00189s
should use the markers0.00148s
Vocabulary Is Stored In Items - Items can hold Vocabulary
should be able to create an Item from a Vocabulary0.00270s
should be able to see if items are equal0.00567s
User Adds Vocab To Quiz - The user enters AddNewVocabularyContext
should have an AddNewVocabularyContext0.00203s
should enter the AddNewVocabularyContext when instructed0.00176s
should have a view for a Vocabulary when the context is entered0.00227s
should have a GTK view that allows editing of the Vocabulary0.04366s
User Adds Vocab To Quiz - The user chooses to add the entered Vocabulary
should be able to add the view's Vocabulary to the Quiz0.00197s
should not add invalid Vocabulary0.00182s
should add the vocabulary to the parent context's quiz0.00382s
should have a button on the Gtk window for adding the vocab0.04085s
User Adds Vocab To Quiz - The fields in the view are cleared when a Vocabulary is added
should clear the fields in the Gtk window when an item has been added0.04539s
should not clear the fields if the item was invalid0.04015s
User Adds Vocab To Quiz - Doesn't add the same Vocabulary twice
it should refuse to add an item that already exists0.00446s
User Adds Vocab To Quiz - The user can search the dictionary
can load the and search the dictionary from this context0.07774s
can load the and search the Chinese dictionary from this context0.08302s
User Chooses the Review Problem Types - Options are stored and read
should have the correct defaults0.02073s
should store the default options0.02210s
should store changed options0.20837s
should show that the quiz needs saving if certain options are changed0.02677s
should know if the review options have been set0.02599s
should clear the review defaults when the reviewOptions are set0.02343s
should create a list of allowed levels0.02499s
User Chooses the Review Problem Types - Options view can modify options
should be able to set the review reading option0.06340s
should be able to set the review kanji option0.06229s
should be able to set the review meaning option0.06304s
User Changes Options Story - Options are stored and read
should have the correct defaults0.02115s
should store the default options0.02219s
should store changed options0.02309s
should show that the quiz needs saving if certain options are changed0.02577s
shouldn't need to save if the options are changed to their current value0.02471s
should load a file with different options0.02979s
should be able to assign the options to another options object0.22330s
User Changes Options Story - Options view can modify options
should destroy the options Window when it closes0.06492s
should be able to run twice0.07440s
should be able to set the Random Order option0.06404s
should be able to set the Promote Threshold option0.06353s
should be able to set the Intro Threshold option0.06357s
should be able to set the language option0.06414s
Load Edict Entries on Demand - Can find an entry
should find an entry in a JEDictionary0.00328s
should be able to find an entry in an EUC edict file0.00662s
should be able to find an entries in a JEDictionary0.00752s
Load Edict Entries on Demand - Extra Edict tests
should return nil from vocab() when index is out of range0.00206s
should be able to load a Quiz from an Edict file0.00450s
should be able to parse hacked JLPT files0.00362s
Schedule Items Story - New items are scheduled from now
should schedule difficulty 0 items 5 days from now0.02259s
should schedule new items from now even if there are scheduled items0.02566s
should set a maximum of the duration * 2 + 25%0.02431s
should schedule a minimum of the last duration0.02312s
should vary the backoff depending on the previous duration0.02265s
should be able to sort the review set items according to schedule0.03248s
JLDrill::Gtk::MainWindowView
should have a widget when initialized0.03446s
should react to destroy signals0.03419s
should have an icon0.03419s
JLDrill::Gtk::StatisticsView
should close the view when the window is destroyed0.05195s
JLDrill::ShowStatisticsContext::StatisticsView
should be able to update the statistics in the view0.00160s
should exit the context when the view is closed0.00114s
JLDrill::ShowStatisticsContext
should be created by the main context0.00187s
should have a view0.00185s
should not be able to create the context twice at once0.00177s
should not show statistics if there is no quiz0.00174s
should update the view with the parent's quiz statistics on entry0.26309s
JLDrill::SetOptionsContext
should be created by the main context0.01763s
should update the view with the parent's quiz options on entry0.00349s
should update the parent's quiz options with the views options on exit0.00326s
should not update the parent's quiz options when cancelled0.00354s
should not run the options dialog if there is no quiz0.00162s
JLDrill::MainContext
should open the main view when it is entered0.00208s
should exit the App when it is exited0.00241s
should enter the loadReferenceContext when loading the reference0.00161s
should enter the showStatisticsContext when showing statistics0.00158s
should not try to open files if it doesn't get a filename0.00365s
should load drill files as drill files0.00394s
JLDrill::GetFilenameContext
should be created by the main context0.00171s
should immediately exit the context after entering it0.00158s
should set the filename and directory from the view0.00131s
JLDrill::LoadPath
should not find files if empty0.00114s
should be able to add a directory to the load path0.00165s
should not find files that don't exist0.00072s
should prioritize directories added first0.00234s
should not add a nil path0.00108s
JLDrill::Deinflection::Reason
should be able to parse an reason from the deinflect file0.00194s
JLDrill::Deinflection::Reason
should parse a reason0.00148s
JLDrill::DeinflectionRulesFile
should load the file properly0.17118s
JLDrill::Vocabulary
should be able to parse vocabulary from strings0.00503s
should be able to tell a valid vocabulary from invalid0.00545s
should not break the parser to try to parse nonsense0.00491s
should be able to assign the contents of one Vocabulary to another0.00661s
should be able to set definitions and markers0.00387s
should set definitions and markers to nil if empty0.00315s
should be able to set kanji, reading and hint0.00431s
should set kanji, reading and hint to nil if empty0.00293s
should be able to insert carriage returns0.00360s
should be able to insert quotes0.00311s
should be able to make a clone0.00357s
should parse commas properly0.00543s
should have a hash based on the reading and kanji0.00649s
JLDrill::Meaning
should have types and usages when created0.00112s
should be able to parse a single usage0.00167s
should be able to parse a single usage with types0.00227s
should be able to parse a specific single usage with types0.00225s
should be able to parse a meaning with types and a specific single usage without types0.00226s
should be able to parse a meaning with types and a specific single usage with types0.00241s
should be able to parse multiple usages0.00331s
should be able to get all types in the meaning0.00184s
should be able to get all definitions in the meaning0.00234s
should be able to output the meaning as a string0.00055s
JLDrill::Definition
should have a value and types when created0.00071s
should be able to parse Edict definitions0.00074s
should be able to parse Edict definitions with a type0.00083s
should be able to parse Edict definitions with many types0.00087s
should pick up multiple sets of types0.00091s
should be able to match equivalence0.00092s
should be able to handle parenthesis0.00080s
should be able to handle special language tags0.00080s
JLDrill::Usage
should have a value and types when created0.00107s
should be able to parse Edict usages0.00481s
should be able to output the edict usage again0.00046s
JLDrill::GrammarType
should have a list of grammar markings0.00111s
should be able to look up the types0.29567s
should be able to look up the special language tags0.01526s
should be able to parse a string of types0.00190s
should be able to reject non-types0.00085s
JLDrill::Radical
should be able to parse an entry from the radkfile0.00553s
should be able to parse an entry with an alternate glyph0.00610s
should be able to parse an entry with multiple alternate glyphs0.00528s
JLDrill::RadicalList
should be able to parse a file in a string0.00542s
should be able to parse a file on disk0.10588s
JLDrill::RadicalFile
should be able to read the file in chunks0.09443s
JLDrill::KanaFile
should be able to read the file in chunks0.01088s
JLDrill::Config
should have a DATA_DIR0.00064s
should not be using the Gem DATA_DIR in the tests0.00063s
should use the Gem::datadir if set0.00109s
should resolve data files according to the load path0.00419s
JLDrill::Kanji
should be able to parse an entry from the kanji file0.00412s
JLDrill::KanjiList
should be able to parse a file in a string0.00406s
should be able to parse a file on disk0.00989s
JLDrill::KanjiFile
should be able to read the file in chunks0.26876s
JLDrill::Item
should be able to swap the positions of items0.00293s
JLDrill::Counter
should create the ranges properly0.00444s
should count properly0.00269s
JLDrill::Strategy
should be able to return the status0.02114s
should increment the statistics if correct in bin 40.02142s
should decrement the statistics if incorrect in bin 40.02244s
should use the contents from the quiz0.01979s
should only pick unseen items0.03050s
should demote bin 0 items to bin 0 and reset the level to 00.02070s
should demote other items to bin 1 and reset the level to 00.02653s
should be able to create problems of the correct level0.02394s
should be able to tell if the working set is full0.04690s
should be able to tell if the review set needs reviewing0.03500s
should not review if all the items in the review set are seen0.27594s
should increment the item's difficulty when an item is incorrect0.02397s
should not reset the difficulty when the item is demoted from the 4th bin0.02413s
should reset the consecutive counter on an incorrect answer0.02496s
JLDrill::Statistics
should start with an estimate of 00.00135s
should have an accuracy of 100 if all are correct0.00095s
should set the accuracy correctly0.00269s
should slowly move the estimate towards 1000.00740s
should keep track of the last ten responses0.01314s
should keep track of the recent (up to 10 items) accuracy0.00352s
should calculate the confidence that the probability is > 900.00090s
JLDrill::Contents
should indicate if a range of bins has contents0.01977s
should add items to the last position if the position is set to -10.01957s
should be able to print out the status0.01816s
should be able to count the unseen items in a range0.04147s
should be able to find the nth unseen item in the contents0.05130s
should be able to add items to the contents only if they dont already exist0.02230s
should be able to add the contents from another quiz to this one0.27812s
JLDrill::LevelStats
should count the total number of trials0.00214s
should keep track of the percentage correct0.00252s
JLDrill::Quiz
should have the contents0.02348s
should load a file from memory0.02833s
should save a file to a string0.01933s
should be able to load files of the current version0.02520s
should be able to get a list of all the items0.01909s
should be able to reset the contents0.02044s
should renumber the contents when resetting0.02036s
should be able to move an item from one bin to the other0.01863s
should be able to create a new Problem0.02753s
should eventually promote all items to bin 40.30891s
should use the promote threshold when promoting0.13889s
should update the last reviewed status when the answer is made0.03235s
should update the schedule correctly for bin 4 items0.02491s
should notify subscribers of updates0.01838s
should notify subscribers when a new problem has been created0.02400s
should be able to find paths relative to the save name0.01859s
JLDrill::Tatoeba::SentenceFile
should be able to parse multiple entries0.00408s
should be able to read the file from disk0.29318s
should be able to read the links file from disk0.03990s
should be able to read the Japanese Index file from disk0.04171s
JLDrill::Duration
should create an invalid duration with no argument0.00113s
should create a duration of the required length0.00113s
should parse a duration from a string0.00208s
should output the duration in days0.00110s
should output the duration as a string0.00067s
should assign durations properly0.00065s
JLDrill::Bin
should have a name and number when constructed0.00707s
should be able to push a vocabulary0.00826s
should be able to iterate through the bin using each()0.01816s
should be able to delete an item0.01691s
should be able to sort0.02171s
should output itself in save format0.01644s
should indicate if the bin is empty0.24916s
should indicate if all the items in the bin have been seen0.03022s
should be able to find the first unseen item0.01898s
should be able to set all the items to unseen0.02017s
should be able to count the number of unseen items0.01908s
should be able to find the nth unseen item in the bin0.01763s
should be able to tell if an item exists in the bin0.01784s
JLDrill::Tanaka::Reference
should be able to parse an entry from the Reference file0.00521s
should be able to parse Words0.00125s
should be able to parse the reading0.00334s
should split sentences into Japanese and English parts0.00288s
should be able to parse multiple entries0.00403s
should be able to read the file from disk0.02160s
should be able to read the file in chunks0.01403s
JLDrill::DictionaryEntry
should have a kanji/reading key0.00036s
JLDrill::JEDictionary
should be able to load a dictionary using the DataFile interface0.07194s
JLDrill::Problem
should have a vocab associated with it0.00307s
should give a string representation of the Kanji if it's there0.00569s
should give a string representation of the Hint if it's there0.00581s
should give a string representation of the Reading0.00439s
should give a string representation of the Definitions0.00392s
should have and empty string if the reading isn't set0.00370s
should have and empty string if the definitions aren't set0.00326s
should be able to assign a vocab0.00388s
should create a ReadingProblem for level 00.00322s
should create a KanjiProblem for level 10.00327s
should create a MeaningProblem for level 20.00326s
should create a MeaningProblem for level 1 if there is no kanji0.00318s
should create a ReadingProblem for unknown levels0.00327s
should print the status correctly0.27458s
JLDrill::ReadingProblem
should have a question of kanji, reading and hint and answer of definitions0.00421s
should publish the correct items0.00559s
should use the reading as kanji if there is no kanji0.00373s
should publish the reading as kanji if there is no kanji0.00386s
JLDrill::KanjiProblem
should have a question of kanji and answer of reading, definitions and hint0.00375s
JLDrill::MeaningProblem
should have a question of definitions and answer of kanji, readings and hint0.00368s
JLDrill::ProblemStatus
should react sanely when empty0.00224s
should create a meaning problem if is starts parsing a schedule without a problem type0.00312s
should create schedules for each problem type it recognizes0.01221s
should output to save file format0.00862s
should be able to clone0.01099s
Context::Gtk::App
should start the Gtk main loop when run0.00110s
should quit the Gtk main loop when quit0.00076s
Context::Gtk::Widget
should keep track of the main Window0.00190s